I am trying to run a code in which timer causes an interrupt and everytime interrupt is generated, a variable h is incremented, but it remains zero in quickwatch window. My code is written below in stvd and cosmic compiler.
#define TIM1_PSCRH (*(volatile uint8_t *)0x5260)
#define TIM1_CR1 (*(volatile uint8_t *)0x5250)
#define TIM1_ARRH (*(volatile uint8_t *)0x5263)
#define TIM1_ARRL (*(volatile uint8_t *)0x5264)
#define TIM1_PSCRL (*(volatile uint8_t *)0x5261)
#define TIM1_IER (*(volatile uint8_t *)0x5254)
TIM1_PSCRH = 0x3e;
TIM1_PSCRL = 0x80;
//@interrupt @far void TIM1_OVF_TRG_BRK_IRQ_Handler(void)
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
void assert_failed(uint8_t* file, uint32_t line)
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
What is wrong with the code? Kindly help me.