Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


[now fixed]Can this be an issue with CubeMX?

Hi
Thanks for user Eduardo the below issue is now solved. It looks like its because the clock prescaler had to be reduced as was getting the OVR flag set when the breakpoint was entered. I am now thinking about not using the CubeMX for setting up the adc and use my own code.
Thanks

Scott



Hi

I am beginning to wonder if this is an issue with CubeMX. I wanted to check it many times (most of the day) before thinking it must be a CubeMX issue. I am using Cube 4.20.1, and Keil5 (free version for STM32L0). Running on Windows 10.

I am trying to use the ADC on the STM32L07 as a multichannel scan. I have set up CubeMx for 3 analogue channels, AN0, Temperature and VRef Int.

I have set up the adc ‘Discontinues convertion mode ’ and ‘Continues convertion mode ’ to both Disabled. The setup is also attached and start the sample by HAL_ADC_Start_IT(&hadc);. When executing this once, I expected the ADC_FLAG_EOC code to be executed 3 times and the ADC_FLAG_EOS once. What I was seeing is the EOC being called once, and straight after the EOS gets called. The other two channels dont get sampled.

It works as expected when I have ‘Discontinues convertion mode ’ Enabled. And within the HAL_ADC_ConvCpltCallback(..) routine I done the following, just to check to see if it works: In my main.cpp routine I call HAL_ADC_Start_IT(&hadc); to start convertion, then used it again within the ADC_FLAG_EOC code. And worked as expected, 3 ADC_FLAG_EOC code was executed, and the ADC_FLAG_EOS once. The values were correct. I would like to use it where the one HAL_ADC_Start_IT(..) converts all channels as I was hoping.


Anyone give me advice as now I am totally stuck :-(

Many Thanks

Scott