How to configure the registers of the microcontrollers through MQX ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure the registers of the microcontrollers through MQX ?

1,149 Views
sivakumarananth
Contributor I

Hi everyone ,

          I am working with MQX RTOS for quite sometime.

I have previously working with general embedded project, where the following process will be done .

1. Configuring the Registers by seeing the data sheet of the exact microcontroller.

2. The peripherals will be configured according to the need of the application.

3. And then finally get the final .hex file to be loaded into the target board.

But now , I have the following doubts,

1. Where to check for the registers to be configure according to the project need ?

2. Or How to know where the Registers are configured ?

3. How to configure the individual pins of the Microcontroller through MQX ?

4. Or Tell me how the Pins are configured in MQX RTOS ?

Thanks in Advance

Siva Kumar A

0 Kudos
2 Replies

490 Views
DavidS
NXP Employee
NXP Employee

Hi Siva,

You have many good questions.  I will try to answer but will also ask a few questions too.

To start with which Kinetis device best fit your initial need (ex: K10/K20/K40/K60/K70)?

Which development tools are you using (ex: CW10.6/IAR/Keil/Other)?

Do you want a full RTOS (like MQX) or a simpler smaller RTOS (like MQXLite) or baremetal?

Will you require higher level peripherals like Ethernet, or USB, or access to SDCard or, Other?

To answer your questions:

Q1. Where to check for the registers to be configure according to the project need ?

A1. All Kinetis devices have Reference Manuals that describe the specific peripheral implementation and this is usually in Chapter 3.  The actual signal pinout is in Chapter 10.  Please note that with such highly integrated MCU's most pins have more than one function.  Chapter 10 will show you what peripheral options you have for each pin.  With that said on high pin count devices, a UART0 might be able to be configured to come out on different pins.  Note you can only direct it to one set of pins and not all options.  This is the manual approach.  A more automated approach would be to use the standalone PExDrv10.4 (Processor Expert-PE) eclipse GUI based tool or the PE tool integrated into CW10.6.  PE can help you decide which pins to use for the different peripheral you want to use.

Q2. Or How to know where the Registers are configured ?

A2.  The MCU/device Reference Manual has all peripheral register definitions and default (POR-Power On Reset) configurations.  Kinetis devices in general start up (POR) in a low power state with most peripheral modules disabled, using internal clock and GPIO pins set to GPIO inputs.  It is the software (baremetal or MQX or MQXLite or PE code) that will initialize the MCU/device and ramp your clock up to desired frequency.

Q3. How to configure the individual pins of the Microcontroller through MQX ?

A4.  MQX has many examples in the freely downloaded distribution (www.freescale.com/mqx) .  The default install directory with lots of great examples:

C:\Freescale\Freescale_MQX_4_1_0_GA\mqx\examples

Specifically the GPIO example is at:

C:\Freescale\Freescale_MQX_4_1_0_GA\mqx\examples\gpio

Optionally you could use PE and its GPIO components to access individual pins too.

Q4. Or Tell me how the Pins are configured in MQX RTOS ?

A4.  Please study the GPIO example mentioned in A4.

Other Notes:

Each MCU/device product page has a wealth of information from documents to schematics to baremetal example code and more.

I usually

Useful web links:

www.freescale.com/mqx               MQX download and resources.
www.freescale.com/kinetis               access to entire family of Kinetis MCUs...and eventually MCD/device product page to get docs
www.freescale.com/processorexpert     GUI initialization, driver software generation, auto-code generating
www.freescale.com/tower               rapid prototyping kit but cost more

www.freescale.com/freedom           in-expensive development kit

www.freescale.com/ftf                FTF is Freescale awesome customer only technical training event over multiple days in various locations around the world that give hands-on training, many example application demos', 3rd party vendors, and much more.  The Americas link (FTF America happened in April 2014) has many of the training classes online.  Check out the following link:

Freescale Technical Sessions Library|Freescale

Hope this helps.

Regards,

David

0 Kudos

490 Views
sivakumarananth
Contributor I

Hi David,

       First of all Thank You very much for your valuable reply, the following are my needs in respect with my project

To start with which Kinetis device best fit your initial need (ex: K10/K20/K40/K60/K70)?

K60 series

Which development tools are you using (ex: CW10.6/IAR/Keil/Other)?

CW10.6

Do you want a full RTOS (like MQX) or a simpler smaller RTOS (like MQXLite) or baremetal?

Full RTOS MQX

Will you require higher level peripherals like Ethernet, or USB, or access to SDCard or, Other?

Yes We need all the peripherals for the project.

I Will go through the examples and come back to you.

Thank You Very Much David

Siva Kumar A

0 Kudos