hi,
i am using the Stack version (ble_cc26xx_2_01_01_44627) and TI rtos version (tirtos_simplelink_2_13_00_06).
Issue :
Whenever do a fresh start (After MASS erase + Flash programing) SNV is not working as expected.
Note :
This issue is happen only for MASS ERASE followed by FLASH Programing the stack and APP.
Scenario :
I am writing some data in SNV and read back the same data after the reset (pin (or) POR).
SNV Configuration is Default configuratin (8KB).
Hardware : SMART RF + CC2640 (chip version 2.2)
Stack : SimpleBLEPeripheral
Steps Followed to Reproduce ths issue:
Step1 :
Did Mass errase using the Flash programmer.
Step2:
Flashed the Stack and Appliction.
Step 3:
Application writen the data SNV based on Event (button press)
called SNV read and write in ICALL Aware Task (BLE task).
ex:
writeStatus = osal_snv_read (0x80, SNV_BUFFER_SIZE, osal_write_buffer);
Step 4;
reset the system(pin reset (or) POR), the written value is not retained after the reset (only for first reset).
Step 5:
continue the step 3 and 4 , the written value is retained after the reset.
Observations :
1)Whenever do a fresh start (After MASS erase + Flashing) SNV is not working as expected.
If I am not do MASS erase before Flashig the SNV is working as expected.
2)After the MASS + Flash Programming, read the SNV location (my case address -> 1e000) using FLASH programer , in that values at (1e000-1e003) is FF FF FF FF .
3)If i do normal prgraming without MASS ERASE, read the SNV location (my case address -> 1e000) using FLASH programer , in that values at (1e000-1e003) is 00 00 10 00 .
(or)
After the first reset (STEP 4) if i read the SNV Location the (my case address -> 1e000) using FLASH programer, In this case valeus @(1e000-1e003) changed from FF FF FF FF to 00 00 01 00.
Observation 2 & 3 have any relation with this issue ? because observation 2 shows FF FF FF FF.
Kindly help me on this, i have to go for the production code.
code snipet ;
static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1)
{
uint8_t writeStatus;
// Initialize application
SimpleBLEPeripheral_init();
snvTriggerButtonInit();
writeStatus = osal_snv_read (0x80, SNV_BUFFER_SIZE, osal_write_buffer);
LCD_WRITE_STRING("HELLO", LCD_PAGE3);
LCD_WRITE_STRING_VALUE("VALU 1:", (uint8_t)osal_write_buffer[1], 10, LCD_PAGE6); // USED to check the SNV value After reset
if((osal_write_buffer[0] == 0) || (writeStatus != 0))
{
osal_write_buffer[0] = 1;
osal_snv_write(0x80, SNV_BUFFER_SIZE, osal_write_buffer);
LCD_WRITE_STRING("writeDone", LCD_PAGE4);
}
// Application main loop
for (;;)
{
....
// Waits for a signal to the semaphore associated with the calling thread.
// Note that the semaphore associated with a thread is signaled when a
// message is queued to the message receive queue of the thread or when
// ICall_signal() function is called onto the semaphore.
ICall_Errno errno = ICall_wait(ICALL_TIMEOUT_FOREVER);
if (errno == ICALL_ERRNO_SUCCESS)
{
.....
//Changed nothing on this section
}
// If RTOS queue is not empty, process app message.
while (!Queue_empty(appMsgQueue))
{
if (events & SBP_SNV_WRITE)
{
events &= ~SBP_SNV_WRITE;
osal_snv_write(0x80, SNV_BUFFER_SIZE, osal_write_buffer);
LCD_WRITE_STRING("writeMod", LCD_PAGE5);
}
}
Thanks
Jayachandran R