ADC in M4Core

Hi,
Can you Provide reference for Following in M4Core (FreeRTOS) vf61 Module

  1. ADC
  2. Timers

Regards,
Aneesh K N

Any Updates

Any Updates on

  1. ADC
  2. Timers
    Regards

Sorry there are no reference drivers for Timer or ADC driver.

The Vybrid Reference Manual describes timers and ADC available on the platform. The Linux ADC driver might be useful when implementing a FreeRTOS driver.

There is the Cortex-M4 core SysTick timer which is used to schedule the FreeRTOS tasks. I also think the native FreeRTOS Timer API is driven by this timer, hence this might be a useful resource:

Note that the Colibri iMX7 family, which also have a Cortex-M4, have a much more advanced heterogenous multiprocessing architecture (e.g. it provides Resource Domain Controller which allows better isolation). On-top of that, driver support is also much better, e.g. there is an ADC driver.

Hi,
We were trying to implement ADC Functionality in M4 Core. As part of initialisation we Tried to change ADC1_CFG to our required Value (As a start). We are facing following Issue

  1. If we try to Set ADC1_CFG the thread HelloTask is Not running
  2. Once we remove the Line were we configure ADC1_CFG (Line 69) The task is executing Fine

Please find the attached file
How can we clarify/understand the issue?link text

hi, is you function
//SetRegister(0x400BB014, 0x98); //ADC1_CFG register address
running fine? Did you test it?

The Cortex-M4 likely crashes due to missing clocks. For every peripheral in the SoC you have to enable clocks first before using them. The GPIO example in examples/vf6xx_colibri_m4/demo_apps/gpio_sample/ can be used as a reference. In this particular case you need to ungate the clock using:

 CCM_ControlGate(ccmCcgrGateAdc0, ccmClockNeededAll);

For more details how the clocking is working refer to the Vybrid Reference Manual available directly from NXP.