TWR-K70P120M demo code

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

TWR-K70P120M demo code

Jump to solution
1,590 Views
vibhu
Contributor III

Hi Guys,

I have twr-k70f120m and twr-ser  boards. At first I tested the democode which was already in the board and it was working fine. I downloaded codewarrior v10.2.2 and erased the chip to flash the new code.

Capture1.PNG

I erased and ran the code in debug mode and the code was executed.

Now if I again flash the demo code into the  chip the code is not working/executing.

Capture2.PNG

I want to again flash the demo code which had the #memory game, accelerometer, touch led on/off.

Can anyone please tell me how to flash it and why the board is not working even after the code flash is successful (image 2)?

Also the reset led (D2) is partially on all the time and it glows brightly when I press the reset button. Is it the normal behavior or is there anything wrong with the board?

Please Help !

Regards.

1 Solution
1,444 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Vibhu,

 

How is your device being enumerated? It should look as follows:

 

pastedImage_2.png

 

Then, please make sure your project compiles correctly, to do this you need to create your workspace into the Kinetis_SC folder. Just as the readme you mentioned indicates.

 

It is likely that the project shows some errors when trying to build it. Please do as follows in the same image.

 

pastedImage_3.png

 

After that you shouldn’t have any issues to build the project.

 

When trying to debug I receive the following message.

 

pastedImage_4.png

 

This tells me that I need to update the firmware of OSJTAG. To do this I need to connect my board in bootloader mode. Please follow the next steps in order to do the update.

 

-Disconnect you board.

-Place a jumper in J10 (please check the following snippet from User Guide).

-Connect the board again.

-Click OK in the Confirm message.

pastedImage_5.png

Once the firmware has been updated you need to go back to debugger mode, to do this you should do the following.

 

-Disconnect you board.

-Remove the jumper in J10.

-Connect the board again.

-Click OK in the Confirm message.

 

After following this steps I was able to flash my TWR-K70F120M. Please let me know if this helps.

pastedImage_6.png

 

Best regards,
Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
5 Replies
1,020 Views
Mansoorshaik
Contributor I

Hello NXP Experts

I need a demo code for BLDC control of Motor (traphezoidal control) Kindly share it for MCUKV31F512 model.

0 Kudos
Reply
1,444 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Vibhu,

 

First of all, I recommend you to download the latest version of CodeWarrior IDE for Kinetis MCUs which is CW 11.1. You can download it from the below link:

https://www.nxp.com/design/software/development-software/codewarrior-development-tools/codewarrior-l...

 

In addition, you can use the drivers and bare metal examples for TWR-K70F120M from the following link:

https://www.nxp.com/webapp/sps/download/license.jsp?colCode=KINETIS_120MHZ_SC

 

Hope it helps!

 

Have a great day,
Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,444 Views
vibhu
Contributor III

Hello Felipe,

Thank you for your suggestion. I downloaded the latest version of the CodeWarrior as mentioned by you and also I downloaded the KINETIS_120MHZ_SC. I followed the readme given inside the build for cw which I have attached. I imported the project and gave build as mentioned in point number 4 but there are no console prints for building or whether it has built. 

I continued to step 5 and it is throwing error while debugging.

Capture2.PNG

I selected the above configuration OSJTAG.

I got an error.

Capture1.PNG

I re-selected the configuration to PnE U-MultiLink.

Capture3.PNG

But again I got the same error.

Capture4.PNG

Nothing seems to work. Where am I possibly wrong ? 

I am not able to program in keil also.

Please Help :smileysad: !

Thanks,

Vibhu.

0 Kudos
Reply
1,445 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Vibhu,

 

How is your device being enumerated? It should look as follows:

 

pastedImage_2.png

 

Then, please make sure your project compiles correctly, to do this you need to create your workspace into the Kinetis_SC folder. Just as the readme you mentioned indicates.

 

It is likely that the project shows some errors when trying to build it. Please do as follows in the same image.

 

pastedImage_3.png

 

After that you shouldn’t have any issues to build the project.

 

When trying to debug I receive the following message.

 

pastedImage_4.png

 

This tells me that I need to update the firmware of OSJTAG. To do this I need to connect my board in bootloader mode. Please follow the next steps in order to do the update.

 

-Disconnect you board.

-Place a jumper in J10 (please check the following snippet from User Guide).

-Connect the board again.

-Click OK in the Confirm message.

pastedImage_5.png

Once the firmware has been updated you need to go back to debugger mode, to do this you should do the following.

 

-Disconnect you board.

-Remove the jumper in J10.

-Connect the board again.

-Click OK in the Confirm message.

 

After following this steps I was able to flash my TWR-K70F120M. Please let me know if this helps.

pastedImage_6.png

 

Best regards,
Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,444 Views
vibhu
Contributor III

Hello Felipe,

Thank You for the help.

It was giving errors and was not able to build because it was inside two sub folders. I copied it into desktop and tried the way you told and it worked like a charm :smileyhappy: