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
已解决! 转到解答。
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.
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.
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