as the topic
Hi,Ivan:
yes! I have written the function __disable_irq() in my source code,but the compiler Can't find the function.I search the whole solution files.I also can't find it.
Are you using an example? If so, which one? It should automatically be included through the cmsis_gcc.h header file.
HI,Ivan:
example:BLE_APP_MOUSE
SDK16
one more another question:the source code as below,the "for"statement would be optimised,how to prevent it?
void sensor_init(void)
{
uint32_t VAR1;
uint32_t VAR2;
nrf_gpio_cfg_output(power);
nrf_gpio_cfg_output(cs);
nrf_gpio_pin_set(cs);
// nrf_gpio_pin_set(power);
nrf_gpio_pin_clear(cs);
nrf_gpio_pin_set(cs);
for(VAR1=0;VAR1<10000;VAR1++)
{
}
nrf_gpio_pin_clear(cs);I'm unable to reproduce your error. Using SDK 16, I can add __disable_irq(); fine.
one more another question:the source code as below,the "for"statement would be optimised,how to prevent it?
Multiple ways, easiest is by turning optimization off at compiler level. If you google "How to disable optimization for specific function", you'll see various examples.
I'm unable to reproduce your error. Using SDK 16, I can add __disable_irq(); fine.
one more another question:the source code as below,the "for"statement would be optimised,how to prevent it?
Multiple ways, easiest is by turning optimization off at compiler level. If you google "How to disable optimization for specific function", you'll see various examples.
Hi,Ivan:
Thank you for your reply, Pls close this topic,thank you!