- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to get the system uptime since the chip is powered on and working, similar to the micros() and millis() macro in Arduino.
Is there any pre-built function available in PDL or I will have to create a custom function for that?
Thanks for any help!
Dan
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no pre-built function in PDL to do this. You will need to create by yourself.
You will be probably better off using the SysTick to implement this. You can configure a systick callback to increment a counter on every second or to the maximum period of the systick. When you want to know the up time, call a function to read back this counter + the current counter in the system tick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @datn02,
The PDL APIs can be found here: https://infineon.github.io/mtb-pdl-cat2/pdl_api_reference_manual/html/index.html
Regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no pre-built function in PDL to do this. You will need to create by yourself.
You will be probably better off using the SysTick to implement this. You can configure a systick callback to increment a counter on every second or to the maximum period of the systick. When you want to know the up time, call a function to read back this counter + the current counter in the system tick.