AnsweredAssumed Answered

STM32F4+SD+Interrupt Problem

Question asked by fernandez.victor.002 on Nov 10, 2016
Latest reply on Nov 10, 2016 by fernandez.victor.002
Hi all, 

I'm trying to write a code of a data logger with the following characteristics:
  • A string is captured using interruptions by a uart at 921600 bauds: The information is stored byte by byte, and the whole string is storaged at a queue (dynamically allowcated) which is processed at the main loop.
  • When the system is in the main loop, depending on the input string some tasks may be executed, the main one is to store a string (about 310 characters) into a SD card (more than 4 Gb class 10).
I'm employing HAL libs and CubeMx initialization for processor, peripherals, etc. My SDK is Eclipse Kepler with AC6.

The system collapses sometimes and sometimes not, and I don't know why. I've been reading at this forum, and I've found some similar cases, where the system collapses due to interrupts. Other ones (Clive) says that more than 4GB SD cards may causes problems. I don't know why it collapses, and another code without the Queue works properly (but it cannot storage information at the rates I will need). I'm desperate, and the solution is not clear. If someome can help me I will be grateful.

Feel free to request code extracts and everyting you want. 

Thanks and best regards.