ammaree wrote on Saturday, September 05, 2015:
In an application I am developing I have come across a puzzling situation. The background is as follows:
Hardware is standard CC3200 LaunchPad
Software using CC3200 SDK v1.1.0 and FreeRTOS 8.2.2,
Environment using latest Code Composer Studio (CCS) v6.1.0.104
ASSERT is enabled for all my code as well as the SDK driverlib, simplelink and oslib components and tested to trigger everywhere.
configASSERT is enabled for FreeRTOS and tested to trigger if I on purpose change (to an invalid value) configMAX_SYSCALL_INTERRUPT_PRIORITY.
Although the CC3200 is M4 architecture (without FPU) the official SDK ships with an older version of FreeRTOS (8.0.1) and provides a ARM_CM3 port as opposed to an ARM_CM4 port.
In order to overcome some challenges with the CM3 implementation I adapted the latest official FreeRTOS CCS ARM_CM4F port by simply removing the VFP related code, nothing else.
Originally I only used taskENABLE_INTERRUPT() and taskDISABLE_INTERRUPT() function and everything worked perfectly
I then decided to change all references to taskENTER_CRITICAL() and taskEXIT_CRITICAL() and that is where the mystery started…
The application now fails in various places, stages and modes, but always in a way where debugging is impossible, no debug exception handler triggering, no stack trace, nothing.
- Stack size is not a problem, all tasks have at all times a minimum of 972 to 2848 bytes unused.
- I have tried module by module to determine if the problem only occurs in s certain function, no luck.
- If I use tasKENTER/EXIT_CRITICAL() anywhere it crashes.
- Change all references to taskEN/DISABLE_INTERRUPTS and it runs rock solid.
- Only xTaskNotifyFromISR and portYIELD_FROM_ISR is used in 1 routine, no other API calls from ISRs
What am I missing since I did not touch any of the related code in the port…
All help appreciated.
Andre