dear:
in my esp32 app,there is a Timer group0 ISR handler,as follow:
float dataFloat;
int dataInt;
void IRAM_ATTR imer_group0_isr(void *para)
{
dtaInt = 123;
dataFloat = (float)dataInt;
// will be error when i use "make monitor" to run it,but it is ok when compile when i use "make flash"
。。。。。。。。。。。。。。
}
void Test_int_to_float()
{
dtaInt = 123;
dataFloat = (float)dataInt;
// it is ok
}
in the IRAM_ATTR function,the software will reboot because of "dataFloat = (float)dataInt",,,but when i put this in a function has no "IRAM_ATTR " ,it is ok.
please help me ,thanks!
some questions when use IRAM_ATTR
-
- Posts: 9761
- Joined: Thu Nov 26, 2015 4:08 am
Re: some questions when use IRAM_ATTR
Sorry, you can't use floating point calculations in an ISR at the moment because the ISR handler does not save/restore the floating point coprocessor state.
Who is online
Users browsing this forum: Bing [Bot] and 123 guests