KSDK 1.1.0 + MQX, problem running sdcard and hello world example [branch from How to Build HTTPS server example]

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

KSDK 1.1.0 + MQX, problem running sdcard and hello world example [branch from How to Build HTTPS server example]

942 Views
swapnilv
Contributor III

Hi,

Regarding sdcard sample examples; i tried to run the sample sdcard example given in KSDK 1.1.0 from location:

KSDK_1.1.0\filesystem\mfs\examples\sdcard  for  twrk60d100m tower board. I have set serial connection for terminal ap[plicaion to :

115200 baud, 8 data bits, 1 stop bit, no parity and no flow control.

But I don't see anything on terminal screen.

Also when I insert the SD card adapter into tower board; the LED's which are present at LAN cable connector on board stop blinking.

I tried to run simple Hello World example given in KSDK1.1.0 but that is also not working.

Please look into this and let me know your comments.

Thanks,
Swapnil

0 Kudos
9 Replies

470 Views
swapnilv
Contributor III

I checked the jumper settings on twrk60d100m tower board and TWR-SER module. Both are set as per TWRK60D100M User manual.I built all the libraries again. Still the sample exaples are not working.

Also I observed that when I insert the SD card adapter into tower board; the LED's which are present at LAN cable connector of serial board stop blinking.

Also no messages are displayed on terminal output.

Please let me know what could be the issue?

Regards,

Swapnil

0 Kudos

470 Views
DavidS
NXP Employee
NXP Employee

Hi Swapnil,

Please look attached pictures of TWR-K60D100M and TWR-SER jumpers.

The TWRK60D100M User Manual is really for baremetal code setup and to run using the TWR-K60D100M card by itself.

To use the Tower kit with TWR-SER and MQX, please use the jumper settings in the pictures.  MQX_4.1.1 has documentation for the jumper setting when using Tower kit.  Please look at C:\Freescale\Freescale_MQX_4_1_1_GA\doc\MQX_Getting_Started.pdf section 9.12 for TWR-K60D100M.

The KSDK_1.1.0 doesn't seem to have this same documentation so I will raise this as an issue and hope to get it added for next release.

BTW: I just tested the demo using TWR-K64F120M Tower kit with TWR-SER using KDS_2.0.0/KSDK_1.1.0 and had no problem.  Unfortunately I cannot test the TWR-K60D100M as I have loaned that board out for a week.

Regards,

David

0 Kudos

470 Views
swapnilv
Contributor III

Hi David,

Thanks for your reply. I had to change few jumpers on TWR_SER board as suggested by you.

Still I dont see any output on terminal screen.

In MQX_Getting_Started.pdf section 9.12 it is mentioned that:

"To enable TWR-SER RS232 interface, change the BSP_DEFAULT_IO_CHANNEL configuration option to "ttyd:" in the mqx\source\bsp\twrk60d100m\twrk60d100m.h".

But no such file is present in KSDK 1.1.0.

Please let me know how I can enable TWR-SER RS232 interface so that I can see the messages on terminal screen.

Also I observed that sample HTTPSRV example works if SD card is not inserted in its slot. But sample example does not work (web pages are not displayed) when  the SD card is inserted into its slot. LED's which are present at LAN cable connector on board stop blinking when SD card adapter is inserted. Is this the expected behaviour?

Thanks,

Swapnil

0 Kudos

470 Views
DavidS
NXP Employee
NXP Employee

Hi Swapnil,

In the sdcard example project open the KSDK_Files folder and edit the board.h file.

Or you can go directly to the boards folder to edit the file. C:\Freescale\KSDK_1.1.0\boards\twrk60d100m

Edit lines 43 and 44 to change what UART you want to use.

The default UART is UART5 which goes to the on-board debugger interface.

Switch it to UART4 to have it go to the TWR-SER card.

The edit should look like following:

    #define BOARD_DEBUG_UART_INSTANCE   4                              //DES was 5

    #define BOARD_DEBUG_UART_BASEADDR   UART4_BASE          //DES was UART5_BASE

Regards,

David

0 Kudos

470 Views
swapnilv
Contributor III

Hi David,

I have made the modifications as suggested by you in file board.h.

Still nothing is shown on serial terminal (The serial cable works fine with my other project examples; so no issue with cable).

See attached snapshot.

serial1.JPG.jpg

Also, could you please let me know your comment on another issue that I have mentioned in previous reply regarding HTTPSRV example does not work if SD card is inserted  (LED's which are present at LAN cable connector on board stop blinking when SD card adapter is inserted)

Thanks,

Swapnil

0 Kudos

470 Views
DavidS
NXP Employee
NXP Employee

Hi Swapnil,

My twr-k60d100m has been returned.

A quick test shows I read the schematic incorrectly and it it UART3 that needs to be configured in the board.h and not UART4 for the TWR-SER interface to operate.  My apologizes for the incorrect reference.

The edit should look like following:

/* The UART to use for debug messages. */

//DES UART3 is to TWR-SER, UART5 is to OSJTAG interface

    #define BOARD_DEBUG_UART_INSTANCE   3                              //DES was 5

    #define BOARD_DEBUG_UART_BASEADDR   UART3_BASE          //DES was UART5_BASE

With my setup I can see output on terminal using the TWR-SER card with TWR-K60D100M.

I am running the KDS_2.0.0 and KSDK_1.1.0 httpsrv_twrk60d100m project.

I have inserted a SD Card and all is working however I have not added code to interface to the SD Card and mount MFS.

If you have done this, please post your project.

Regards,

David

0 Kudos

470 Views
swapnilv
Contributor III


Hi David,

Just wanted to know if this is the expected behaviour that when SD card is inserted without MFS the LAN port LED's stop blinking. Or there could be some other issue with board? Jumper settings are done as mentioned by you in our previous conversation.

Thanks,

Swapnil

0 Kudos

470 Views
DavidS
NXP Employee
NXP Employee

Hi Swapnil,

With my hardware setup (TWR-K60D100M+TWR-SER) using MQX4.1.1 and the web_hvac demo, once I run the code and establish a "ipconfig dhcp" network address, the system is working correctly.  If I then insert a SD Card my Ethernet PHY LEDs remain on and the system continues to operate as expected.

I'm attaching my "user_config.h" header file for you to compare against yours.

Also please review your code to determine if anything is configuring the SD Card pins (Port E (PTE) pins) and/or causing contention of some sorts when card is inserted.

Hope this helps.

Regards,

David

0 Kudos

470 Views
swapnilv
Contributor III

Hi David,

Configuraing it to UART3 worked and I can see the messages on terminal window now.

Thanks for your help !!

Regarding SD card issue for httpsrv example; I have not added code to interface to SD card and mount MFS.

I am just trying to run the httpsrv_twrk60d100m project as it is. I am using KSDK_1.1.0 and IAR workbench version 7.10.3.6932.

Below is snapshot of tower board along with TWR-SER board when SD card adapter is not inserted. Project works fine in this case and I can access the sample web pages using browser for assigned IP address to tower board.

Without SD card.png

But when the SD card adapter is inserted then I am not able to access the pages on the assigned IP address  tower board.

With SD card.png

You can see the LED's at LAN connector have stopped blinking when the adapter is inserted.

What could be the reason for this?

Thanks,

Swapnil

0 Kudos