forever_student
New member
Hello All,
I am trying to blink the LED on the Teensy 3.6 using the KDS (Kinetis Design Studio) but am having some difficulty. Any pointers, suggestions, or better yet, example code is much appreciated! I will try to be as complete as I can about the steps I've gone through. Please ask questions if I am not clear or thorough.
1. Installed KDS (version 3.2.0) on my mac (macOS 10.12.1) and made sure I had GNU Tools for ARM Embedded Processors
2. Started a new C project and set it up for the CPU K66F18. More specifically, "CPU_MK66FX1M0VLQ18" is defined in the project settings.
3. Skimmed the K66 Sub-family reference manual and other online resources to come up with the code below
4. In the Project drop down menu, I go to Properties > C/C++ Build > Settings. Then to the Toolchains tab and select the Create Flash Image box.
5. The code above builds without errors or warnings
6. I copy the .hex file from the Project Explorer window (left side) under the Debug tab and paste it in a known location (Desktop)
7. Open the Teensy Loader (1.26)
8. Reset the Teensy, select the .hex file from the Desktop, click Program, then click Reboot
What I expect to see after steps 1-8 is for the LED to be on but I have not been so fortunate.
I found two hex files online (from the PJRC site, I believe) that are called blink_fast_Teensy31 and blink_slow_Teensy31. Using the steps 7-8 I can successfully flash the Teensy and see the LED blinking. This suggests my issue is either in the project settings, code or somewhere in between.
Thank you in advance for your time and help!
I am trying to blink the LED on the Teensy 3.6 using the KDS (Kinetis Design Studio) but am having some difficulty. Any pointers, suggestions, or better yet, example code is much appreciated! I will try to be as complete as I can about the steps I've gone through. Please ask questions if I am not clear or thorough.
1. Installed KDS (version 3.2.0) on my mac (macOS 10.12.1) and made sure I had GNU Tools for ARM Embedded Processors
2. Started a new C project and set it up for the CPU K66F18. More specifically, "CPU_MK66FX1M0VLQ18" is defined in the project settings.
3. Skimmed the K66 Sub-family reference manual and other online resources to come up with the code below
Code:
#include "fsl_device_registers.h"
static int i = 0;
int main(void) {
PORTC_PCR5 = PORT_PCR_MUX(0x1);
GPIOC_PDDR = (1<<5);
GPIOC_PSOR=(1<<5);
for (;;) {
i++;
}
return 0;
}
4. In the Project drop down menu, I go to Properties > C/C++ Build > Settings. Then to the Toolchains tab and select the Create Flash Image box.
5. The code above builds without errors or warnings
6. I copy the .hex file from the Project Explorer window (left side) under the Debug tab and paste it in a known location (Desktop)
7. Open the Teensy Loader (1.26)
8. Reset the Teensy, select the .hex file from the Desktop, click Program, then click Reboot
What I expect to see after steps 1-8 is for the LED to be on but I have not been so fortunate.
I found two hex files online (from the PJRC site, I believe) that are called blink_fast_Teensy31 and blink_slow_Teensy31. Using the steps 7-8 I can successfully flash the Teensy and see the LED blinking. This suggests my issue is either in the project settings, code or somewhere in between.
Thank you in advance for your time and help!
Last edited: