Search found 593 matches

by PeterR
Thu Nov 08, 2018 10:22 am
Forum: General Discussion
Topic: SPI re-entrancy
Replies: 18
Views: 7428

Re: SPI re-entrancy

Thanks for the interest. I have started adding xPortGetCoreID() to debug statements so that I am sure. There are sleeps in each harness however. I should add that the CAN test runs the SPI controller back to back with the ESP32 CAN. The program is also >> bigger than IRAM and I have not set IRAM pro...
by PeterR
Wed Nov 07, 2018 10:55 am
Forum: General Discussion
Topic: SPI re-entrancy
Replies: 18
Views: 7428

SPI re-entrancy

I have started integrating my device drivers. I have two SPI device. A CAN controller on VSPI and a FLASH on HSPI. The CAN transactions use spi_device_transmit() (DMA channel = 0). CAN SPI access is driven on core 1 (to ensure low latency). The SPI test harness runs on core 0 and sends commands to c...
by PeterR
Tue Nov 06, 2018 1:10 pm
Forum: General Discussion
Topic: Wrapping app_main() causes test to fail
Replies: 6
Views: 2706

Re: Wrapping app_main() causes test to fail

I did 'seem' to think that the issue was stack size. I was wrong, the problem was/is the uninitialized member in the ExtFlash project. Close but no prize. The log would not help. The error causes the application to freeze (which would have been easy to see if I had pins free for a debugger). I did c...
by PeterR
Mon Nov 05, 2018 10:42 am
Forum: General Discussion
Topic: SPI flash driver
Replies: 5
Views: 2684

Re: SPI flash driver

Hi, The issue was the lack of a 'is_qpi' initialiser in the downloaded driver. Gonna try -Weffc++ and start coding properly. To answer your questions - my understanding is that I must be running from IRAM in order to write main/master FLASH - ' This means that both CPUs must be running code from IRA...
by PeterR
Fri Nov 02, 2018 1:38 pm
Forum: General Discussion
Topic: SPI flash driver
Replies: 5
Views: 2684

Re: SPI flash driver

Please note that ExtFlash does not initialise 'is_qpi' & this can give you performance issues or errors depending on what you want!
by PeterR
Fri Nov 02, 2018 1:10 pm
Forum: General Discussion
Topic: Wrapping app_main() causes test to fail
Replies: 6
Views: 2706

Re: Wrapping app_main() causes ExtFlash test to fail

ExtFlash constructor is incomplete. 'is_qpi' was not initialised. Most of the time it initialised false. For my use not. I guess that adding the extra calls allowed me to find a previously used part of memory. The dangers of downloading code... I wish I had JTAG pins free & could use a debugger. Tha...
by PeterR
Fri Nov 02, 2018 11:02 am
Forum: General Discussion
Topic: Wrapping app_main() causes test to fail
Replies: 6
Views: 2706

Re: Wrapping app_main() causes test to fail

Thanks. ExtFlash is quite small (check the link). The stack's watermark shows that I have plenty of space left. Fails even if I allocate 16K to main. The program does 'work' if I place ExtFlash at file scope. However the problem also shows in my application where I dynamically create ExtFlash & hold...
by PeterR
Thu Nov 01, 2018 4:13 pm
Forum: General Discussion
Topic: Wrapping app_main() causes test to fail
Replies: 6
Views: 2706

Re: Increase startup stack size

uxTaskGetStackHighWaterMark(NULL) reports watermark of 3880 (I set 5684). I can see that I have increase the startup task's size. Calling the original (renamed) app_main() from new app_main() fails with above watermark. Placing ExtFlash at file scope allows the program to work again though. So the w...
by PeterR
Thu Nov 01, 2018 3:34 pm
Forum: General Discussion
Topic: Wrapping app_main() causes test to fail
Replies: 6
Views: 2706

Wrapping app_main() causes test to fail

I am debugging an issue which seems to be related to the start up stack's size. Example https://github.com/lllucius/esp32_extflash/commit/10fdf1ef7e7a0107e908619226dc14a10be629a2 works. If however I modify the test harness (see attached file), where I have simply renamed original app_main() as app_m...
by PeterR
Wed Oct 31, 2018 2:13 pm
Forum: General Discussion
Topic: Lost SPI transactions when using VSPI and HSPI
Replies: 4
Views: 2568

Re: Memory allocation & exceptions

The ExtFlash driver hangs within wait_for_command_completion() which is waiting for spi_device_get_trans_result(spi, &t, portMAX_DELAY). This happens regardless of if I initialize my MCP2515 SPI interface before or after the ExtFlash is intialised. My MCP2515 driver does not seem to mind the ExtFlas...

Go to advanced search