Part Number: CC2652P
Hello,
I have an application on CC2652 that runs a main loop code in a function called as interrupt by Sensor Controller (scTaskAlertCallback) every 1ms. This ISR works along the BLE framework derived from ProjectZero. The main loop code should write few bytes to the SNV memory using osal_snv_write. I'm testing my code toggling a pin every 1ms to check the main loop timing and execution, triggering the snv write every 1000ms. I noticed that from time to time the 1ms pulse train generated by main code execution (usually perfectly stable) has a stop about 20ms long (test pin pulses disappear then restart).
I also wrote a wrapper around osal_snv_write that handles several SNV block IDs in the allowed range 0x80-0x8F, to manage a larger data block as a whole, so actually the code writes every time 255 bytes. The call to osal_snv_write is from a task (the main loop enqueues the write request on a RTOS queue, the main BLE task dequeues and calls the osal write).
My questions are:
- does osal_snv_write disable interrupts during its execution so that scTaskAlertCallback is not called ?
- why such temporary disable occurs only from time to time, not every call of osal_snv_write ? has it to do with flash compaction ? how can I avoid stopping my main loop execution ?
Thanks
Fabio