MQX Kinetis K20 FLexTimer Access

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

MQX Kinetis K20 FLexTimer Access

Jump to solution
954 Views
Cdn_aye
Senior Contributor I

We have a working MQX PIT timer system on the CF V1, 51JM128, but now we are using the K20dx256 and all the rules have changed. In that system I assigned

VMCF51JM_STRUCT_PTR     reg_ptr;

Then did all the register access's        reg_ptr->TPM2.TPMxMOD = 0xFFFF;                                     // MODULO = 0xFFFF , this is for the test ovf interrupt

But it doesn't seem to work this way on the Kinetis. I was wondering if someone would have a suggestion on how to set up the register access & headers.

I have read through all the examples and do not see which headers should be included when we use MQX. Do we include headers from Processor Expert, or the header under

C:\Freescale\CW MCU v10.3\MCU\lib\wizard_data\ARM\DataBase\derivatives\MK20Z.h ?

This seems to have a (base) pointer defined somewhere but I can't find out how to define (base).


Thanks

Robert

Tags (3)
1 Solution
601 Views
Cdn_aye
Senior Contributor I

Found the pointer, it is in the mqx directory

C:\Freescale\Freescale MQX 3.8\mqx\source\bsp\twrk40x256\twrk40x256.h

Included that file, and it all compiles and links now.

Under mqx/ CFV1, we had to create a pointer to a structure and index into the registers, with Kinetis they give the pointer in the above file and all the offsets. It is obvious once you find it; the hard part was finding it.

View solution in original post

1 Reply
602 Views
Cdn_aye
Senior Contributor I

Found the pointer, it is in the mqx directory

C:\Freescale\Freescale MQX 3.8\mqx\source\bsp\twrk40x256\twrk40x256.h

Included that file, and it all compiles and links now.

Under mqx/ CFV1, we had to create a pointer to a structure and index into the registers, with Kinetis they give the pointer in the above file and all the offsets. It is obvious once you find it; the hard part was finding it.