Configuration lost for TWR-K64F

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

Configuration lost for TWR-K64F

917 Views
silent-dawn
Contributor II

When building the uTasker project for TWR-K64F, errors are reported by IDE. It shows undefined symbols RETAIN_LOADER_MODE, USB_HOST_POWER_CONFIG, USB_HOST_POWER_ON and USB_HOST_POWER_OFF. I find they are defined for K64F board, but no for TWR-K64F. However, these two boards are very similar, so I reused the macro definitions in the section of K64F.

I think maybe you could add these definitions to the source code in the config.h file.

IDE: mcuxpresso latest version.

Project: uTasker free commercial edition.

Labels (1)
Tags (1)
0 Kudos
3 Replies

836 Views
nxf58904
NXP Employee
NXP Employee

Hi Mark,

Thank you for your help.

Jianyu: 

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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

836 Views
mjbcswitzerland
Specialist V

Hi

If using the on-board USB host connection I think that these defines will be suitable (PTC9 needs to be set high to supply 5V USB power to the bus in host mode):

    #define K64_USB_ENABLE          PORTC_BIT9                           // active hgh to enable USB host 5V output
    #define USB_HOST_POWER_CONFIG() _CONFIG_DRIVE_PORT_OUTPUT_VALUE(C, (K64_USB_ENABLE), (0), (PORT_SRE_SLOW | PORT_DSE_HIGH)) // configure output in off state
    #define USB_HOST_POWER_ON()     _SETBITS(C, K64_USB_ENABLE)          // enable USB host 5V output to USB bus
    #define USB_HOST_POWER_OFF()    _CLEARBITS(C, K64_USB_ENABLE)        // disable USB host 5V output

The retain input is used to keep the processor in the serial loader after it has checked for new firmware on a memory stick. Usually the same input as used to force the serial loader is used, which would be

#define RETAIN_LOADER_MODE()   FORCE_BOOT()
or

#define RETAIN_LOADER_MODE()   (_READ_PORT_MASK(C, SWITCH_1) == 0)

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]

0 Kudos

836 Views
nxf58904
NXP Employee
NXP Employee

Thanks for your sharing and suggestion. I will feed back to the relevant departments.

Jianyu: 

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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