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