AnsweredAssumed Answered

Posting semaphore from SPI IRQ crashes app

Question asked by José Antonio Martínez Iglesias on Aug 4, 2015
Latest reply on Aug 11, 2015 by José Antonio Martínez Iglesias

Hi all,

 

I am trying to develop a transport protocol over SPI to comunnicate a FRDM-KL27Z board (master) with a CC2640 from TI (slave).

 

I added a callback call at the end of function SPI_DRV_MasterCompleteTransfer() in file fsl_spi_master_driver.c to inform my app when a SPI transfer is completed. The application launches a SPI write operation and then is waiting in a semaphore in its main loop.

 

Once the SPI transfer is completed, the function SPI_DRV_MasterIRQHandler() is called, and this ends calling my callback function. From it, I call OSA_SemaPost(&app_main_sem), and this call makes my app crash.

 

I use lwsemaphores in other parts of the program and they are working OK. Also, I have put a breakpoint before the post operation and everything seems ok with the semaphore.

 

Any ideas or suggestions?

 

Thank you very much

Outcomes