SD-Card Insert/Remove Handlers
Moderators: RoccoMarco, lbednarz, tfAteba
Re: SD-Card Insert/Remove Handlers
so the panic msg is saying stack overflow, but is i said earlier if i increase the the thread static WORKING_AREA(waThread1, 128); from 128 (default value) upto 512, it then hits the _unhandled_exception
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: SD-Card Insert/Remove Handlers
By examining the stack areas you can understand which stack is overflowing, if you use ChibiStudio then the ChibiOS debug view does that for you.
Giovanni
Giovanni
Re: SD-Card Insert/Remove Handlers
right declaring the varibles the are used by the f_open locally caused the _unhandled_exception
FIL file;
UINT wbytes;
FRESULT result;
char msgstr[40];
if i then increased WORKING area to 512 all is working.
The RT view is working now, that must have been down to the stack issues.
FIL file;
UINT wbytes;
FRESULT result;
char msgstr[40];
if i then increased WORKING area to 512 all is working.
The RT view is working now, that must have been down to the stack issues.
Re: SD-Card Insert/Remove Handlers
Now have a working USB-CDC and SD-Card Demo for STM3241G-EVAL board.
Giovanni - if you would like this demo for your repository let me know and i'll send it to you
Thanks for teh help
Giovanni - if you would like this demo for your repository let me know and i'll send it to you
Thanks for teh help
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: SD-Card Insert/Remove Handlers
Hi,
If you could post a ready-to-go zip file in the contributions forum it would be great.
About the ChibiOS view, you need to hit the refresh button in the toolbar.
Giovanni
If you could post a ready-to-go zip file in the contributions forum it would be great.
About the ChibiOS view, you need to hit the refresh button in the toolbar.
Giovanni
Re: SD-Card Insert/Remove Handlers
Returning from
At the B instruction, seem to throw an hardfault in ff.c from fatfs R0.10b.
This gets called from f_stat, all other fatfs functionality seems ok.
Code: Select all
DWORD create_chain(FATFS* fs, DWORD clst )At the B instruction, seem to throw an hardfault in ff.c from fatfs R0.10b.
This gets called from f_stat, all other fatfs functionality seems ok.
Re: SD-Card Insert/Remove Handlers
This is because a FILINFO structure is assumed to be "empty" when filled with 0. When filled with standard stackfill of 0x55 it will crash.
It was in reaction to mukululul a few pages back, not very on topic anymore.
It was in reaction to mukululul a few pages back, not very on topic anymore.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times