Hi,
The question is:
IS POSSIBLE TO DO IT?
The used microcontroller is LPC54616J512BD100 - LQFP 100 pins Package.
DESCRIPTION:
I received a Source Code to add new functions and peripherals.
It was done on uVisoln and builds and works propperly.
PROBLEMS FOUND WITH uVison infrastructore:
1) For some reason I can only make a opload using Debbugger. But for some reason I could detect in some cases after complete uploads it do not boots.
2) I Created a .bin and .hex file using uVision and tryed to download them using USART USP Mode using a FlashMagic tool. Flashing wit Verify works propperly. For certification I read the flashed image as binary and externaly compare it .bin with source and matches. But it code do not boots.
STRAGEGY FOR MIGRATION:
The source code done on uVision is very offusced, and not easy to maintain an add the new functionality are needed.
The MCUXpresso eclipse IDE is muth more friendly to works so I preffer to mannually migrate it source code to a new project on MCUXpresso eclipse IDE.
MAIN FIRMWARE FUNCTION:
Controls Digital Inputs and Outputs. The communication channel is USB_HID with presseted VID/PID using proprietary communication protocol. It Firmware is very Simple.
MCU CONFIGURATION:
1) One Flexcomm USART 4 for debbugging,
2) SPI channels for external EEPROM.
3) GPIO ports.
4) USB_HID for Host Communication. **(Here was my hardest problem)**
I Started the converting source code by Board,c/h and it was done successfully.
it uses Keil NXP USB_HID Drivers and API that I colud not find them on MXUxpresso.
Solved! Go to Solution.
Alice Yang,
First I whant to thanks you for all hints that you gave.
Now I´m able to migrate a uVision project to MCUxpresso.
Its not so easy as I was thing, but, is possible. Its good because I have no experience with NXP IDE and products.
Oh: I Saw that there are a lot of demo for many situations. Very interesting. Using Interrupts, DMA and FreeRTOS improve significantly the proccessing.
Regards,
Oliveira.
Alice Yaung,
O will do what you suggested and relpy the result.
Thank you very muth for it hint.
Hello OliveiraNxp,
You can only create a new MCUXpresso project or open a demo, then porting the code from KEIL to MCUXpresso by hand.
Abbout USB_HID drivers, MCUXpresso sdk also has, open a USB_HID demo ,you can find them:
Regards,
Alice
Hi Alice,
I´m trying to find the dev_hid_generic and couldnt find it.
Can you explain the procedure ou send me the download link for it?
Thanks,
Oliveira
Hello Oliveira,
Please open the link and then refer to my attachment to download,
https://mcuxpresso.nxp.com/en/select
After download, you can find the USB demos under the path:
SDK_2.7.0_LPCXpresso54618\boards\lpcxpresso54618\usb_examples .
Regards,
Alice
Once more,
Thanks for sending your video.
The reason I didnt found is because I dont have it developing board, but, i will try to get it following your instructions.
I found another USB_HID source code for LPC54608.
I Sussessfull migrate it code to LPC54516, loaded into my board but, only after it I see that my board uses USB0_DM/DP pins and it project expect tu uses GPIO_29 & GPIO_30 for usb communication.
I Attache it for you see Okay!
Hello Oliveira ,
Do you meaning in the BOARD_InitPins() function?
The PIO0_29 and PIO0_30 are configured as FC0_RXD_SDA_MOSI and FC0_TXD_SCL_MISO.
Hello Alice Yang,
I´m very happy you are keeping ation on my problem.
You are right: is exatly these pins.
I attached a PDF with have the Hardware Design of the original project I Received. As you will see.
The firmware is not complex nor hard to develop because use a lot of GPIO pins configured as digital Inputs and outputs.
The IC4 - MAXQ1061 is a Cryptographic Controlle and has no firmware code written to use it.
The IC2 0 AT25DF081A is an SPI Flash memory used to save configuration and logs.
The IC10,11 and 12 are used as FLEXCOMM PORT SPI and USART to connect one external board that we didnt received. The IC13-15 are used to commute internal and external SWD mode the signal SWD-ADC is controlled by PIO1_7 pin I8. I beleave that these it is used for specific action that i unknow. May be an specific firmware that we dont have it source code.
The IC9 MAX845CSA IC9 is a RS385 interface. It was not configured nor used on current firmware, but, it will be used on new firmware to communicate with another microcontroller using a proprietary crypto protocol.
All other componnents are used for POWER, up to 16 digital OUTPUTS, and 32 digital INPUTS ( 04 x 8 bits - controlled by two out bits.
As I told you, the source code uses uVision IDE. It build propperly w/o error nor warnings. it loads using ST-link debbugger and others. We made an external option to load the builded binary firmware using ISP Mode USART. But, after upload it is not working. As MCUxpresso IDE is a eclipse based and much more easy to use. We decided migrate. We are having problem to megrate USB HID function and this is very important because it has a proprietary communication protocol with external PC used as controller by Driver/API.
Hello Oliveira ,
So do you still have question now ? The USB HID porting, remmend use demo under MCUXpresso IDE as I said before .
Regards,
Alice
Alice Yang,
First I whant to thanks you for all hints that you gave.
Now I´m able to migrate a uVision project to MCUxpresso.
Its not so easy as I was thing, but, is possible. Its good because I have no experience with NXP IDE and products.
Oh: I Saw that there are a lot of demo for many situations. Very interesting. Using Interrupts, DMA and FreeRTOS improve significantly the proccessing.
Regards,
Oliveira.