Hello everyone, i am beginner in RIOT OS, i have been trying to run the blinky led program, if i comment the delay function the led is glowing but when using delay i am getting problem, when i traced the function i noticed it is stuck in delay function.
In ‘void ztimer_sleep(ztimer_clock_t *clock, uint32_t duration)’ function definition.
at the last of this function the mutex_lock(&mutex), the program become stuck at this point. I don’t know the reason behind it, please help me to resolve this issue.
It’s expected that the program waits for an interrupt on mutex_lock(&mutex) - the idea is that this interrupt will be generated by the timer once the timer is expired.
I assume you are still in the process of bringing up a new platform? Do you have support for interrupts and timers yet?
Is tests/periph/timer working for you?
You might want to check if the callback function of your timer gets properly executed / if the timer is triggering an interrupt at all.
the callback above one that is i am getting, but it is not accurate and i haven’t configure timer yet. getting callback from Ztimer.
One more problem i am facing. actually in our micro controller there is no PLIC interrupt controller, we are just using simple interrupt controller. when i tried configure interrupt part in it by taking reference of other RISC-V architecture board they have PLIC mechanism, and all the function related to PLIC is already available in RISC-V common folder. Can i map the interrupt mechanism (SIC) of our board in cpu/(my_board)/ periph folder or in riscv_common??