Hi,
I am trying to implement a TestDelay but I don´t achieve nothing. I want a bucle that stay on it for 10 seconds. I have added diferent functions but I don´t achieve my target. I have also sent the configuration of the clocks. I want to enter to the bucle and if I push the button in this time, the variable "result" is True.
The problem is that the I don´t know the number I have to implement in "TestDelay()". Moreover, the function makes different stranges things because comes to "Boot_IsRequest" function. I need a reply as soon as possible as I have to send the project very soon.
Thank you for all,
Hi @JonAnder_Amante,
This SW delay will never be precise, it depends on many things.
ARM does not specify execution time of the instructions, there is the cache, etc.
The compiler can optimize it out.
Have you considered using a HW timer?
BR, Daniel
Hi,
I want a timer each 1 second, I don´t know how I have to implement a timer through Hardware. Could you give me the steps to achieve the purpose. You must take into account I want to use with the functions that I sent you previouly.
Thank you for all,
Hi @JonAnder_Amante,
If you use RTD driver, you can use the system clock for it. The drivers use OSIF for timeouts. There are APIs like OsIf_GetCounter().
Or the RTC can be used.
It depends on what precision you need.
What is the delay in your project now? Can you use GPIOs to measure it?
BR, Daniel
Hi,
I haven´t achieved the purpose of the interrupt. I have two questions.
1. Could you take me steps ta achieve the target, I can´t look the gpios with the oscilloscope.
2. Another important point is that finally I want to do a change. I want to check that I have received a specific message trough CAN. I have tried different options with the function receive but I can´t check nothing because the PCAN appear as BUSHEAVY. Could you take me steps to check if the pc is receiving this message "04 31 01 F5 18" (The message is sent through PCAN).
Thank you for all,
Hi,
I have created a new thread.
I hope your answer as soon as possible.
Thank you for all,