Dear @dragostoma ,
When I use the Example project - s32k3xx_adc_single_read_s32ct, it works fine.
The ADC value can change with the resistor on my EVB. I can also see value changes in FreeMaster.
As for the reason why I will use custom code to develop the ADC function, it is because I think it is a relatively uncomplicated function on EVB.
This may allow me to become familiar with how to use Custom Code to call programs from S32CT.
Because I need to implement many functions that are currently not supported by MBDT, such as DMA, WDG, RTE, SENT, RTOS, etc., and even I2C (MBDT 1.4.0).
As for why I didn’t choose DIO for learning, it’s because I can easily use Model Header and System Initialzation to achieve the functions I need.
I think this is because it is too simple, so I tested it with ADC.
I checked some articles: such as the implementation of WDG and RTOS on MBDT.
At present, it is recommended to use Model Header and System initialization to implement it.
There is no example project provided yet, so I think I need to understand and be familiar with how to call the program generated by S32CT.
This allows me to use the relevant functions correctly.
If I can't even call the adc function correctly, I think it will be difficult for me to conduct follow-up research at all.
All that said, this is why I don't use the adc example project.
I'm very sorry for any inconvenience caused to you.
I can also follow your suggestion and call the program from s32ct through the Model Header and System Initialization.
But I think I still need to understand why I can't implement the adc function through the Model Header and System Initialization now.
To simplify the problem, I only reserved the ADC_POT0 channel to read the ADC with interrupt.
In my opinion it should reproduce the same results as Example Project - s32k3xx_adc_single_read_s32ct.
Could you tell me reason, please?
I think this is a great help to me.
Thanks