Hi, i want to set the sleep compare timer to generate an event when it is equals to the sleep timer. So i set the compare time writing to the register ST2 ST1 STO, bat the STIF is alwais 0. I've written a loop in which i show the current value of the sleep timer end the compare value(ST2). The program never exit from the loop (while STIF==0).
uint8 ST0Temp = ST0; uint8 ST1Temp = ST1; uint8 ST2Temp = ST2 + 5; ST2 = ST2Temp; ST1 = ST1Temp; while(1){if(LDRDY == 1){ST0 = ST0Temp; break;}}
while(STIF == 0) { ST0Temp = ST0; ST1Temp = ST1; uint8 ST2Temp2 = ST2; HalLcdWriteStringValue( "STIE",ST2Temp,10,HAL_LCD_LINE_1 ); HalLcdWriteStringValue( "ST0",ST0Temp,10,HAL_LCD_LINE_3 ); HalLcdWriteStringValue( "ST2",ST2Temp2,10,HAL_LCD_LINE_2 ); }
can help me?
I see a lot of terms, register names (?) and other symbols which are not found in any MSP users guide or datasheet. So what are you talking about?
Are you using a specific OS/library? Are you talking about an MSP430 processor at all?
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.
thanks for the answer.
I'm using CC2540,SmartRF05EB,and IAR embedded to write the code. I'm usig the libraries included whith the exemple code(SimpleBLECentral,SimpleBLEPeripheral). excuse me bat it is the first time that i do it.