FreeRtos+UDP and FreeRtos+TCP with LPC1769

Hello, We have tested the example code FreeRTOSPlusUDPandCLILPC1830GCC. It seems to work well. Now we would like to port this example to our microcontroller LPC1769. In the zip-package from FreeRtos there is a folder with drivers for LPC1769: FreeRTOSv9.0.0FreeRTOS-PlusSourceFreeRTOS-Plus-UDPportableNetworkInterfaceLPC17xx So I took the file “NetworkInterface.c” from this folder and put it into my project in place of original file for LPC1830. I also added the driver files for emac: * lpc17xxemac.c * lpc17xxemac.h * and all other files which were needed. Now the compiler can’t find the following functions: * EMACNextPacketToRead(); * EMACSetNextPacketToSend(); * EMAC_StartTransmitNextBuffer(); I can find that functions in the driver for LPC1830 but they don’t work with LPC1769. The questions are as follows: * Is this driver “NetworkInterface.c” for 1769 incomplete? * What do I have to do to get it work? Our target is to use the FreeRtos+TCP (we need webserver and UDP), but there is no example code for our LPC microcontrollers. That is why we would like to port the example FreeRTOSPlusUDPandCLILPC1830GCC. If it works correctly, then we will try to port the FreeRtos+TCP.

FreeRtos+UDP and FreeRtos+TCP with LPC1769

Are you aware that you will need also Fat to get this system to work? Or modify the filesystem API to do some raw access to flash etc. Unless you have plenty of space on externel memory.

FreeRtos+UDP and FreeRtos+TCP with LPC1769

Why do I need FAT? I thought it should also work without it. We have a sd-card and external Flash memory on our board, if it is needed.

FreeRtos+UDP and FreeRtos+TCP with LPC1769

In the LPC18xx example EMACNextPacketToRead() is implemented in the lpc18xxemac.c souce file – which is a driver file provided by NXP, and it seems the LPC17xx version of NetworkInterface.c expects the equivalent LPC17xx driver from NXP to provide the same function. It sounds like the version of lpc17xxemac.c that you are using (is that from NXP too?) is different to the one used when the networkinterface.c file for that chip was written. Look in your lpc17xxemac c and h source files to see what it calls the functions that you are missing – I’m sure they will be there but it sounds like they are named differently.

FreeRtos+UDP and FreeRtos+TCP with LPC1769

Thank you very much for your answer. Yes, the file lpc17xx_emac.c is from NXP. The name of the library is: LPC175x_6x CMSIS-Compliant Standard Peripheral Firmware Driver Library I also thought that the functions should be there but with other names. There are following functions lpc18xx_emac.c: BaseTypet EMACInit(EMACCFGType *EMAC_ConfigStruct); int32_t EMAC_UpdatePHYStatus(void); uint32_t EMAC_GetReceiveDataSize(void); void EMAC_StartTransmitNextBuffer( uint32_t ulLength ); void EMAC_SetNextPacketToSend( uint8_t * pucBuffer ); void EMAC_NextPacketToRead( xNetworkBufferDescriptor_t *pxNetworkBuffer ); void EMAC_UpdateRxConsumeIndex(void); BaseType_t EMAC_CheckReceiveIndex(void); BaseType_t EMAC_CheckTransmitIndex(void); Whereas in lpc17xx_emac.c I can find: Status EMACInit(EMACCFGType *EMACConfigStruct); void EMACDeInit(void); int32t EMACCheckPHYStatus(uint32t ulPHYState); int32t EMACSetPHYMode(uint32t ulPHYMode); int32t EMACUpdatePHYStatus(void); void EMACSetHashFilter(uint8t dstMACaddr[], FunctionalState NewState); void EMACSetFilterMode(uint32t ulFilterMode, FunctionalState NewState); void EMACWritePacketBuffer(EMACPACKETBUFType *pDataStruct); void EMACReadPacketBuffer(EMACPACKETBUFType *pDataStruct); void EMAC_IntCmd(uint32_t ulIntType, FunctionalState NewState); IntStatus EMAC_IntGetStatus(uint32_t ulIntType); Bool EMAC_CheckReceiveIndex(void); Bool EMAC_CheckTransmitIndex(void); void EMAC_UpdateRxConsumeIndex(void); void EMAC_UpdateTxProduceIndex(void); FlagStatus EMAC_CheckReceiveDataStatus(uint32_t ulRxStatType); uint32_t EMAC_GetReceiveDataSize(void); FlagStatus EMAC_GetWoLStatus(uint32_t ulWoLMode); I cannot find equivalent functions. Could you suggest which functions should I use?

FreeRtos+UDP and FreeRtos+TCP with LPC1769

Well the write and read packet buffers would seem the place to start, but really, just seeing the function names means all I can do is guess, which is not going to help you. You have the source files and presumably examples of how to use them, so study what you have.