I am porting codes from cc2541 to cc2650. It is a project with OAD support, i.e. the whole image includes BIM, Image A, Image B and Stack. The project is developed with reference to the document OAD for CC26xx.docx.
I add a new profile. My profile code calls GATTServApp_RegisterService() and provides the attribute table and the read and write callback functions.
In the read and write callback functions, it needs use osal_snv_read and osal_snv_write to retrieve and write parameters in the SNV area. However the app crashes on calling osal_snv_read and osal_snv_write every time within the callback functions. If I move the osal_snv_read and osal_snv_write functions to the taskFxn in the main app file through the appMsgQueue, there is no crash. However I could not find a way to block the callback functions until osal_snv_read and osal_snv_write functions finish. I try to use Semaphore_Handle method to block the callback functions, but it crashes as well.
Is this due to the configuration? Or these osal functions are not allowed to use this way? In cc2541, I use the same code base and no problem.
In the stack project, the setting is: OSAL_SNV=1.