Problems to run USB stack v 4.1.1 msd_mfs_generic demo on FRDM-K20D50M

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

Problems to run USB stack v 4.1.1 msd_mfs_generic demo on FRDM-K20D50M

1,105 Views
MAPC
Senior Contributor I

Hello,

I'm trying to run USB Stack v. 4.1.1 msd_mfs_generic demo on FRDM-K20D50M. This will be reference to develop a USB memory stick Datalogger for my application with this MCU.

Since this demo was developed for TWR-K20D50M, I changed the sci initialization in order to properly configure the SGC and MUX registers and meet Freedom hardware setup and select the correct UART associated with Open SDA CDC.

But it didn't work. Not even Attach event was detected. I still couldn't find where and how the failure ocurred during debugging.

When I run the same demo for TWR-K70 for example, it works perfectly.

Could anybody help me with this issue?

Thanks and regards,

Marco Coelho

0 Kudos
8 Replies

822 Views
yasuhikokoumoto
Senior Contributor I

Hello Marco,

I am not sure I might be correct.

Did you connect J21 jumper pin?

Best regards,

Yasuhiko Koumoto.

0 Kudos

822 Views
MAPC
Senior Contributor I

Hello, Dear Yasuhiko

Thanks for the tips.

I really forgot to mount this jumper on FRDM-K20D50M. But I just did it now and tried to run again. After mounting and shortening it I got the following screen:

pastedImage_1.png

Have you ever experienced something like that?

0 Kudos

822 Views
yasuhikokoumoto
Senior Contributor I

Hello Paul,

it seems to occur the hard fault by some reasons.

Honestly speaking I have only an experience which I executes the simple USB sample codes which are included in the freescale package.

The hard fauld would hapen by several reason.

A USB sample code is too complicated to analyze if errors had occurred.

I'm very sorry but I cannot help you.

I would expect that experts will help you.

Best regards,

Yasuhiko Koumoto.

0 Kudos

822 Views
MAPC
Senior Contributor I

Dear Yasuhiko,

I just ran the msd_mfs_generic demo code on a FRDM-K20D50M kit, as it is. So, I really can't understand this failure.

I'm trying to find the cause of this Hard Fault interrupt by debugging the code. But it is not easy!

Anyway, thank you very much!

Best regards,

Marco Coelho

0 Kudos

822 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Marco Coelho,

This case reminds me some bug I reported before, please kindly refer to [USB stack ver 4.1.1] a code issue in msd_mfs_generic host demo  for details.

Hope that helps,


Have a great day,
Kan

Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

822 Views
MAPC
Senior Contributor I

Dear Kan_Li

Thanks for the response.

Strange! This part appears in grey to me! What does this mean? And how can I fix it?

pastedImage_0.png

It seems like "__CWCC__" macro is not defined in the demo. Should I force it and just touch to see it?

Thanks and regards,

Marco Coelho

0 Kudos

822 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Marco Coelho,

The __CWCC__ is a predefined macro in CW IDE, and it is integrated in the compiler , and active during the compiling, so it might be inconvenient to read the code, but actually there is no need to define it in a project.


Have a great day,
Kan

Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

822 Views
MAPC
Senior Contributor I

Hi, Kan_Li

I still don't understand why this __CWCC__ is not automatically set in the demo. Do you have an idea of what might be causing this issue and how can I fix it?

Marco Coelho

0 Kudos