8 Replies Latest reply on Nov 13, 2016 8:28 PM by necdetalpmen_1437776

    How to use CY_NOINIT?

    necdetalpmen_1437776

      Hi,

         

      I am trying to use CY_NOINIT to not initialize a variable after soft reset conditions. I keep getting "reset = 0" message from UART. Am I missing something?

         
      #include <project.h> static uint8 is_soft_reset CY_NOINIT; void app_init(void) {     UART_1_Start();    if(!is_soft_reset) {         UART_1_PutString("reset = 0\n");         CyDelay(1000);         is_soft_reset = 1;         CySoftwareReset();     }     UART_1_PutString("reset = 1\n"); } int main(void) {     app_init();     for(;;)     {       }}