2018-07-29 09:38 PM
Hello Everyone,
I am using NUCLEO-F746ZG having STM32F746ZG mcu. I was trying the USB device - MSC_Standalone example provided with stm32cubef7. I am using SW4STM32 to compile the example code. The device detects the SD card but when i connect it to the PC via micro USB, device code gets stuck in HardFault exception handler and mass storage is not created on the SD card. Any suggestion would be helpful.
Thanks.
2018-08-09 08:28 PM
Make sure the stack is sufficiently large, and there is a heap if malloc() is used.
NULL check pointers, and enable asserts.
Use a proper Hard Fault Handler so you can isolate the instructions/registers causing the fault.
Instrument the USB and SDMMC stacks to output telemetry via USART/SWV so you can trace functionality and interaction without the debug breaking real-time constraints.