May 04, 2018
12:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 04, 2018
12:08 AM
Hello people of the Forum,
I need help once again. I want to read the Onchip Temperature of the XMC4300 Relax Board, but it doesnt work.
Infineon has an document for the XMC1000 descirbing this procedure
https://www.infineon.com/dgdl/Infineon-ApplicationNote_How_To_Use_On-Chip_Temperature_Sensor_XMC1000...
.... BUT: For XMC4300 it doesnt work.
I include "xmc_scu.h" in my Code but in this File there isnt a function called XMC_SCU_CalcTemperature().
In my Code I do XMC_SCU_StartTemperatureMeasurement() and after that I do XMC_SCU_GetTemperatureMeasurement(). But this only return 0.
--> How is the reading of the Temperature on XMC4300 working?? It couldnt be that hard and I cant be the only one, who has a problem with it.
I need help once again. I want to read the Onchip Temperature of the XMC4300 Relax Board, but it doesnt work.
Infineon has an document for the XMC1000 descirbing this procedure
https://www.infineon.com/dgdl/Infineon-ApplicationNote_How_To_Use_On-Chip_Temperature_Sensor_XMC1000...
.... BUT: For XMC4300 it doesnt work.
I include "xmc_scu.h" in my Code but in this File there isnt a function called XMC_SCU_CalcTemperature().
In my Code I do XMC_SCU_StartTemperatureMeasurement() and after that I do XMC_SCU_GetTemperatureMeasurement(). But this only return 0.
--> How is the reading of the Temperature on XMC4300 working?? It couldnt be that hard and I cant be the only one, who has a problem with it.
- Tags:
- IFX
2 Replies
May 06, 2018
12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 06, 2018
12:08 PM
Are there no Infineon specialists in the Forum who can help me with this seemingly easy thing???
May 08, 2018
01:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 08, 2018
01:49 AM
Ok the Infineon Support sent me the following (what worked for me so far):
#include
volatile uint32_t temperature;
int main(void)
{
XMC_SCU_EnableTemperatureSensor();
// Ignore first measurement
XMC_SCU_StartTemperatureMeasurement();
while (XMC_SCU_IsTemperatureSensorBusy());
temperature = XMC_SCU_GetTemperatureMeasurement();
/* Placeholder for user application code. The while loop below can be replaced with user application code. */
while(1U)
{
XMC_SCU_StartTemperatureMeasurement();
while (XMC_SCU_IsTemperatureSensorBusy());
temperature = XMC_SCU_GetTemperatureMeasurement();
}
}
Leasons learned:
- XMC_SCU_EnableTemperatureSensor() one time at first
- poll on: XMC_SCU_IsTemperatureSensorBusy
- forget the first measurement
Additional:
if you want °C you have to do:
temperature = (XMC_SCU_GetTemperatureMeasurement()-605)/2.05;
Thanks to Infineon Techies for help and myself for posting the solution on the Forum...
#include
volatile uint32_t temperature;
int main(void)
{
XMC_SCU_EnableTemperatureSensor();
// Ignore first measurement
XMC_SCU_StartTemperatureMeasurement();
while (XMC_SCU_IsTemperatureSensorBusy());
temperature = XMC_SCU_GetTemperatureMeasurement();
/* Placeholder for user application code. The while loop below can be replaced with user application code. */
while(1U)
{
XMC_SCU_StartTemperatureMeasurement();
while (XMC_SCU_IsTemperatureSensorBusy());
temperature = XMC_SCU_GetTemperatureMeasurement();
}
}
Leasons learned:
- XMC_SCU_EnableTemperatureSensor() one time at first
- poll on: XMC_SCU_IsTemperatureSensorBusy
- forget the first measurement
Additional:
if you want °C you have to do:
temperature = (XMC_SCU_GetTemperatureMeasurement()-605)/2.05;
Thanks to Infineon Techies for help and myself for posting the solution on the Forum...