AN4368SW issues

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

AN4368SW issues

1,678 Views
xavierbuhot
Contributor II

Hello,

I have just download the project to use the USB stick bootlaoder AN4368SW.


The compilation works properly, I have a twk-K60N512VMD100, I just change the TEM_PORT from uart 5 to uart 3.


I receive the message from the uC but when I plug USB stick nothing happend. "Waiting for USB mass storage to be attached...<\r><\n><\r><\0><\0><\0>"


Why the USB don't work? What modification should I had to the project ?



Best regard.

0 Kudos
15 Replies

1,375 Views
ConstYu
NXP Employee
NXP Employee

I encount similar problems, that's because this code is for old TWR-K60DN512 board, while you are use TWR-K60D100 board, the chip on these two board have different mask, though they have same name, the new board's K60 with mask 4N22D add one CHN bit in PIT_TCTRL1 register, in the orginal code, it is below red code, it write PIT_TCTRL1=0xffff fffD, , after change it to bluw code, the PIT can runs well, also the code can runs well. I write a post in link: Kinetis USB Host MSD bootloader 应用笔记AN4368的一个小Bug - FSL_FAE_ConstYu的博客 - 与非博客 - 与非网

    PIT_TCTRL1 = ~PIT_TCTRL_TEN_MASK;

    PIT_TCTRL1 = ~PIT_TCTRL_TIE_MASK;   //初始代码

   // PIT_TCTRL1 = 0x01; //修改后代码


of course, there are also have other several problems like below, I am finding the solution.

1. it only support S19 with S3 formate, while the IAR generated S2 formate S19 file.

2. it can't support bin formate.

0 Kudos

1,375 Views
xavierbuhot
Contributor II

I check on my project but the modification is already made on my AN4368SW version of the code.

I can't find that line :

PIT_TCTRL1 = 0x01;

0 Kudos

1,375 Views
xavierbuhot
Contributor II

Sorry I made a mistake , I have to change the red lines into the blue line ... I will try it

0 Kudos

1,375 Views
xavierbuhot
Contributor II

I just try it but nothing append when I connect a usb cable ...

0 Kudos

1,375 Views
ConstYu
NXP Employee
NXP Employee

This line is i revised, the default code is the red part, if you use PK60 and mask is not 4N22D, you can go ahead, this part has no such issue.

0 Kudos

1,375 Views
xavierbuhot
Contributor II

Sorry I made a mistake it is TERM_PORT in derivative.h

#define TERM_PORT       UART5_BASE_PTR

Best regard.

0 Kudos

1,375 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Xavier,

it looks you have bad physical connection. In code is nothing incorrect.

Please, do you have connected on UART3 any converter e.g. usb to serial, ... etc?

Best Regards,

Iva

0 Kudos

1,375 Views
xavierbuhot
Contributor II

Than you for the answers.

I think I made a mistake in the explanation of my problem.  is AN4368SW a usb bootloader? Because I think there is a confusion with serial bootloader?

I have proper communication with my K60 thanks to the serial communication, I get all the message, there is no problem. The only modification I made it is to modify :

#define TERM_PORT  

UART3_BASE_PTR

I receive all the data to my terminal properly.

The problem is with the usb connection on my twr-kit. When I plug my usb key on my twr something should happend. I put break point on the USB state list but the USB port always stay at IDLE_MODE like no usb stick has never been connected.

Should I modify some jumper on my board to be able to enable USB on my twr?

NB: The processor on my board is PK60N512VMD100. So I don't think it is the same problem that had?

Best regard.

0 Kudos

1,375 Views
ConstYu
NXP Employee
NXP Employee

PK60N512VMD100 is old K60, have no such issue.

0 Kudos

1,375 Views
xavierbuhot
Contributor II

Ok so according to you, I have the same problem to you?

Unfortunatly, I don't no if it is chenese language but I don't understand your webpage.

Where could I get a link to your project to try it?

0 Kudos

1,375 Views
xavierbuhot
Contributor II

Here is the project I use.

In fact it is just the original project with the TEMP_PORT changed.

0 Kudos

1,375 Views
ivadorazinova
NXP Employee
NXP Employee

Dear Xavier,

please, where in your project set TEMP_PORT? I cannot find it.

Have you sent me right project?

Thank you,

Best Regards,

Iva

0 Kudos

1,375 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Xavier,

please, can you upload your project?

You can look at the example which is for KL25 and compare your solution AN4368 - KL25 USB Mass Storage Device Host Bootloader

Best Regards,

Iva

0 Kudos

1,375 Views
xavierbuhot
Contributor II

Sorry I made a mistake I clic on solve unfortunatly...

How can I upload my directory?

0 Kudos

1,375 Views
ivadorazinova
NXP Employee
NXP Employee

Xavier BUHOT,


just make a .zip and upload here by this way:

attachment.png

attachment2.png

Best Regards,

Iva

0 Kudos