Search found 288 matches
- Tue Dec 05, 2023 10:19 am
- Forum: General
- Topic: Memory Usage of Pico W
- Replies: 4
- Views: 167
Re: Memory Usage of Pico W
The big issue with the PicoW is heap usage, for example I implemented TLS in MMBasic and had to allow a heap of over 32K to get it to work - I've since removed it because TLS without SSL is pretty much useless and I can't imagine how much memory SSL on top of TLS would need. So, in answer to the que...
- Fri Dec 01, 2023 10:27 am
- Forum: SDK
- Topic: Getting rid of malloc?
- Replies: 9
- Views: 535
Re: Getting rid of malloc?
Doesn't help as there is no way of knowing how and if my application is calling a specific instance of malloc. Does CDC use malloc? Timer alarms seem to but what do I need to avoid calling or using to not invoke malloc. Does stdio_init_all() do anything that uses malloc? etc. I, and others, have ask...
- Fri Dec 01, 2023 9:57 am
- Forum: SDK
- Topic: Getting rid of malloc?
- Replies: 9
- Views: 535
Getting rid of malloc?
I've previously asked what, if anything, in the sdk uses malloc (ignoring PicoW functionality) and got no answer. Looking at the map for my application malloc uses over 1K of precious RAM for data structures .data.__malloc_sbrk_base 0x2000d5e0 0x4 c:/progra~2/armgnu~1/125863~1.3re/bin/../lib/gcc/arm...
- Mon Nov 13, 2023 9:55 am
- Forum: SDK
- Topic: Pico W freezes regularly for about 1h
- Replies: 2
- Views: 1170
Re: Pico W freezes regularly for about 1h
I was seeing similar after SDK upgrade from 1.5 to 1.5.1 and have reverted to 1.5 to fix the problem. If you are running 1.5.1 it might be worth trying the same
- Thu Nov 09, 2023 5:08 pm
- Forum: General
- Topic: PicoW - handling stream data (internet radio)
- Replies: 1
- Views: 631
Re: PicoW - handling stream data (internet radio)
All working in MMBasic see https://www.thebackshed.com/forum/ViewT ... &TID=16391
- Thu Nov 09, 2023 12:39 pm
- Forum: General
- Topic: PicoW - handling stream data (internet radio)
- Replies: 1
- Views: 631
PicoW - handling stream data (internet radio)
Before I try and re-invent any wheels, has anyone used the PicoW to read stream data such as internet radio. I can open the radio site as a TCP client (many of them use port 80) and send the command to start the stream. I've also got the PicoW wired to a VS1053 and can send MP3 files to it for playb...
- Mon Oct 30, 2023 12:39 pm
- Forum: General
- Topic: VGA but with fewer colors
- Replies: 4
- Views: 1441
Re: VGA but with fewer colors
MMBasic runs the screen at RGB121. This works very nicely as you get 1 nibble per pixel and a framebuffer is only 38400 bytes (320x240). This also allows clever things like 2 display layers with transparency of one over the other. Have a look at https://www.youtube.com/watch?v=iTqL_GKOkGM and other ...
- Tue Oct 24, 2023 8:30 am
- Forum: General
- Topic: UART issues with overclocked Pico
- Replies: 5
- Views: 1848
Re: UART issues with overclocked Pico
Check the cmake file and main function in picomite.c on GitHub uktailwind picomite for how to underclock the flash which allows overclocking the CPU. Mmbasic runs stably at 378MHz on nearly all Pico clones and all genuine Picos using this technique
- Sat Oct 21, 2023 7:34 am
- Forum: SDK
- Topic: spinlocks, mutexes, or semaphores how to use?
- Replies: 13
- Views: 2794
Re: spinlocks, mutexes, or semaphores how to use?
If you have a system clock, when you acquire the mutex, write the system time into your variable, so other processes can see how long you've had the mutex and maybe guess when it will be released. That's a really nice idea. I can even have the main blocking task on the 2nd CPU "learn" how...
- Fri Oct 20, 2023 8:55 am
- Forum: SDK
- Topic: spinlocks, mutexes, or semaphores how to use?
- Replies: 13
- Views: 2794
Re: spinlocks, mutexes, or semaphores how to use?
Such functionality is pointless, I have some code that several layers down after quite a lot of processing will acquire the mutex in a standard blocked fashion. I don't want to acquire the mutex at the top level as that is wasteful and holds it for longer than necessary nor do I want to do all the ...
- Thu Oct 19, 2023 6:36 pm
- Forum: SDK
- Topic: spinlocks, mutexes, or semaphores how to use?
- Replies: 13
- Views: 2794
Re: spinlocks, mutexes, or semaphores how to use?
Thanks - that is helpful. It would be good though to have an example program in the examples download. There doesn't seem to be a mutex test without trying to acquire the lock. I understand that getting the lock has to be an atomic transaction hence mutex_try_enter() but what I really want is a mute...
- Thu Oct 19, 2023 7:57 am
- Forum: SDK
- Topic: spinlocks, mutexes, or semaphores how to use?
- Replies: 13
- Views: 2794
spinlocks, mutexes, or semaphores how to use?
I need to control access to SPI between the two cores. It is perfectly OK in my application for one core to block while the other is using the SPI. So I need a lock that I try to acquire and block until I get it, do my SPI work, and then release the block. I know this should be easy but I can't find...
- Tue Oct 17, 2023 5:45 pm
- Forum: SDK
- Topic: Using systick on the second core
- Replies: 2
- Views: 1642
Using systick on the second core
How do I use systick on the second core? Do I just refer to it as systick_hw-> or is there a different name for the second core? so: uint32_t delaytime= 0x7FFFFF systick_hw->csr = 0x5; systick_hw->rvr = 0xFFFFFF; systick_hw->cvr=0; while(1){ do { if (multicore_fifo_rvalid()){ multicore_fifo_pop_bloc...
- Thu Oct 12, 2023 7:44 am
- Forum: SDK
- Topic: Compiler warnings in multicore_launch_core1_with_stack
- Replies: 5
- Views: 1835
Re: Compiler warnings in multicore_launch_core1_with_stack
The issue is caused because I set the core1 stack size to zero. Obviously I want it t be zero so I don't waste memory as I am specifically allocating stack for core1. If I set it to 0x10 the warning goes away and the linker seems to optimize out core1 stack usage. Bizarrely the errors also disappear...
- Tue Oct 10, 2023 11:08 am
- Forum: SDK
- Topic: Compiler warnings in multicore_launch_core1_with_stack
- Replies: 5
- Views: 1835
Compiler warnings in multicore_launch_core1_with_stack
I'm compiling with -Wall set (GCC 12.3.1 arm-none eabi) and have eliminated all compiler warnings except as follows: Is this a compiler quirk or am I missing something? Thanks my code excerpt uint32_t core1stack[64]; multicore_launch_core1_with_stack(QVgaCore, core1stack, 256); sdk 1.5.0 void multic...
- Mon Sep 11, 2023 7:08 am
- Forum: SDK
- Topic: memcpy replacement for ARM M0+ core
- Replies: 11
- Views: 1940
Re: memcpy replacement for ARM M0+ core
I look forward to your completed code. This is an area where we are often let down by supplied libraries. I had to do something similar with the STM32H7 and achieved massive improvements using some special floating point registers which can load and store 128 bytes at a time. The other trick I used ...
- Mon Aug 28, 2023 7:33 am
- Forum: SDK
- Topic: Any way to distinguish HW watchdog from just programmed?
- Replies: 10
- Views: 855
Re: Any way to distinguish HW watchdog from just programmed?
Thanks all for the useful input.
I actually solved it before kilograham's post using my own "scratch" resister
unsigned int _excep_code __attribute__ ((persistent));
which I set to a given status when a watchdog had been enabled.
Duh.. Re-inventing wheels
I actually solved it before kilograham's post using my own "scratch" resister
unsigned int _excep_code __attribute__ ((persistent));
which I set to a given status when a watchdog had been enabled.
Duh.. Re-inventing wheels

- Fri Aug 25, 2023 8:58 am
- Forum: SDK
- Topic: Any way to distinguish HW watchdog from just programmed?
- Replies: 10
- Views: 855
Any way to distinguish HW watchdog from just programmed?
When you program a RP2040 using the usual uf2 download the user program sees that a watchdog timeout caused the reboot - watchdog_caused_reboot() returns true.
Is there any way to distinguish this from a "genuine" watchdog timeout?
Is there any way to distinguish this from a "genuine" watchdog timeout?
- Sun Aug 06, 2023 4:40 pm
- Forum: General
- Topic: RP2040 watchdog and Scratch registers
- Replies: 7
- Views: 599
Re: RP2040 watchdog and Scratch registers
Can't help with the scratch registers but I think this does what you want
Code: Select all
uint32_t __uninitialized_ram(mycount);
if(watchdog_caused_reboot())mycount++;
else mycount=0;
- Wed Aug 02, 2023 4:16 pm
- Forum: SDK
- Topic: 1.5.1 broken?
- Replies: 3
- Views: 951
Re: 1.5.1 broken?
My suspicion would be that the change isn't in the time code but is in the web support - the issues only affect the web version of MMBasic. My best guess FWIW is that something is disabling interrupts but that there is a route out of the routine that exits without re-enabling them
- Wed Aug 02, 2023 3:31 pm
- Forum: SDK
- Topic: Watchdog minor documentation error
- Replies: 4
- Views: 834
Re: Watchdog minor documentation error
The hex figure should be 0x7FFFF/1000 = 0x20C4 = 8388
- Wed Aug 02, 2023 12:22 pm
- Forum: SDK
- Topic: Watchdog minor documentation error
- Replies: 4
- Views: 834
Watchdog minor documentation error
Parameters delay_ms Number of milliseconds before watchdog will reboot without watchdog_update being called. Maximum of 0x7fffff, which is approximately 8.3 seconds This doesn't compute 0x7fffff milliseconds is more than 8300 seconds. The statement above occurs in more than one place. 8.3 seconds i...
- Wed Aug 02, 2023 9:56 am
- Forum: SDK
- Topic: 1.5.1 broken?
- Replies: 3
- Views: 951
Re: 1.5.1 broken?
Thought I'd bump this thread as there is definitely some issue that I can't see anyway of diagnosing but has definitely been introduced in 1.5.1 MMBasic runs on the PicoW and Geoff Graham has produced a brilliant web-interfaced watering controller based on it See https://geoffg.net/retic.html for wh...
- Tue Aug 01, 2023 3:49 pm
- Forum: SDK
- Topic: Downloading SDK 1.5
- Replies: 2
- Views: 568
Re: Downloading SDK 1.5
Thank you 

- Mon Jul 31, 2023 5:55 pm
- Forum: SDK
- Topic: Downloading SDK 1.5
- Replies: 2
- Views: 568
Downloading SDK 1.5
Sorry I'm a github beginner.
Please can someone give me the full github commands to download 1.5 rather than 1.5.1.
This needs to be a full download self-consistent with all the various relevant addins (TinyUSB version)
Thanks
Please can someone give me the full github commands to download 1.5 rather than 1.5.1.
This needs to be a full download self-consistent with all the various relevant addins (TinyUSB version)
Thanks