Conflict between JTAG and GPIO pins, using Processor Expert and FRDM-K64F

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

Conflict between JTAG and GPIO pins, using Processor Expert and FRDM-K64F

Jump to solution
2,507 Views
quevedo
Contributor V

Hello,

I am working on a project that uses some pins available in the FRDM K64F headers, namely PTA0, PTA1, and PTA2. However, when creating a project with Processor Expert and setting up those pins with BitIO components, I ger an error message stating that there is a conflict with the Cpu component. Checking on that component, I found out that these pins are used for the JTAG interface. There is an option to disable those pins, but I am afraid of trying something that may disable debugging, and thus bricking my board.

How can I solve this problem? I suppose that pins PTA0-2 should be available, since they are connected to the board headers.

Thanks in advance,

Antonio

Mensagem editada por: Antonio Quevedo

0 Kudos
1 Solution
1,756 Views
EarlOrlando
Senior Contributor II

Hello Antonio,

As you commented, those pins are used by the JTAG interface. You can use these pins as GPIO but you will not be able to debug as soon as you change the pins function.

You could start a pin in an application with the JTAG function (this is the default option) to be able to program the MCU and then change it to another function (such GPIO). The way to do this is to disable the JTAG pin function and configure it as GPIO. It is very important that you disable the option Autostart and that you add a delay before to manually initialize the component (i.e. change the pin function). This will let you to reprogram your MCU before the pin function as GPIO is configured.

Best regards,

Earl.

View solution in original post

0 Kudos
4 Replies
1,756 Views
EarlOrlando
Senior Contributor II

Hello Antonio,

Could you please give more information about your problem?

Best regards,

Earl.

0 Kudos
1,756 Views
quevedo
Contributor V

Sorry I hit the post button by mistake, and then I had to leave the computer for a while. I have just edited my message to explain my problem.

0 Kudos
1,757 Views
EarlOrlando
Senior Contributor II

Hello Antonio,

As you commented, those pins are used by the JTAG interface. You can use these pins as GPIO but you will not be able to debug as soon as you change the pins function.

You could start a pin in an application with the JTAG function (this is the default option) to be able to program the MCU and then change it to another function (such GPIO). The way to do this is to disable the JTAG pin function and configure it as GPIO. It is very important that you disable the option Autostart and that you add a delay before to manually initialize the component (i.e. change the pin function). This will let you to reprogram your MCU before the pin function as GPIO is configured.

Best regards,

Earl.

0 Kudos
1,756 Views
quevedo
Contributor V

Hello Earl,

Thanks for your answer, that's what I thought. I could add a big FOR loop before the PE_LowLevelInit() function to make sure that there is an adequate delay. Anyway, I did not know of the Autostart option, i will make sure that I disable it when needed.

However, I want to keep the ability to debug my sistem. Since I have 3 GPIO pins still left, I think I will reallocate them to substitute the PTA pins assigned to JTAG. It will complicate my custom PCB layout a little, but it will keep debug capabilities.

Thank you

Antonio

0 Kudos