|
Post by kenqks on May 8, 2019 16:07:29 GMT
i am trying to create a timer interrupt that happen every 1 second by using this:
CreateTimerInterrupt(ContinuousTimerInterrupt, 100000000, printI2CLCD); am i not doing correctly, as the interrupt is not running. because according to the user manual the maximum time period is 42 seconds.
|
|
sinai1
Junior Member
Posts: 81
|
Post by sinai1 on May 13, 2019 20:55:58 GMT
For core0 This line should be on Setup, THIS only apply for core0:
/* 10ns per bit count */ CreateTimerInterrupt(ContinuousTimerInterrupt, 100000000, STM0_inttest);
and your code inside the STM0 interrup: void STM0_inttest(void) {
}
remeber on core1 & 2 you have 2 more timers, Core 1 examples:
void STM1_inttest0(void) { digitalWrite(3, ToggleVar1 ^= 1); } void STM1_inttest1(void) { digitalWrite(4, ToggleVar2 ^= 1); } /* Make STM1_inttest0() function run every 100us */ CreateTimerInterrupt0_Core1(ContinuousTimerInterrupt, 10000, STM1_inttest0); /* Make STM1_inttest1() function run every 50us */ CreateTimerInterrupt1_Core1(ContinuousTimerInterrupt, 5000, STM1_inttest1);
remeber on core1 & 2 you have 2 more timers, Core 2 examples:
void STM2_inttest0(void) { digitalWrite(5, ToggleVar3 ^= 1); } void STM2_inttest1(void) { digitalWrite(6, ToggleVar4 ^= 1); } /* Make STM2_inttest0() function run every 100us */ CreateTimerInterrupt0_Core2(ContinuousTimerInterrupt, 10000, STM2_inttest0); /* Make STM2_inttest1() function run every 50us */ CreateTimerInterrupt1_Core2(ContinuousTimerInterrupt, 5000, STM2_inttest1);
Regards.
|
|