NXP Kinetis MK20X256VLH7 (Teensy 3.2 Microcontroller) - Keil RTE_Device.h Issues

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

NXP Kinetis MK20X256VLH7 (Teensy 3.2 Microcontroller) - Keil RTE_Device.h Issues

2,443件の閲覧回数
julioe_fajardo
Contributor I

Hi, i'm working in Keil with the NXP Kinetis MK20X256VLH7 (Teensy 3.2 microcontroller).

The microprocessor seems to get stuck when i wrote to these registers:

PORTB->PCR[16] = (uint32_t)(PORT_PCR_MUX(0x03));

PORTB->PCR[17] = (uint32_t)(PORT_PCR_MUX(0x03));

The problem seems to be that the pin configuration has to be done on the RTE_Device.h file, however i don't know how to reference them in my project.

By the way, I'm configuring the peripherals from the scratch and YES!!!, I try with Codewarrior and don't have any problem.

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

2,135件の閲覧回数
mjbcswitzerland
Specialist V

Hi

Presumably the Keil startup code is missing port register clock enabling so that accesses to the port registers results in a hard fault.

Probably the CW startup code does this for all ports per default and then you don't notice it.

In case of issues you can get Teensy 3.2 Keil support at http://www.utasker.com/kinetis/TEENSY_3.1.html

Regards

Mark

0 件の賞賛
返信

2,135件の閲覧回数
julioe_fajardo
Contributor I

Thanks for replying, your answer was helpful.

It requires enable both UART0 and PORTB clocks, i was enabling only UART0 clock.

0 件の賞賛
返信