2018-02-17 08:23 AM
Hello Everyone,
I am currently working on SPC560C50L3 controller with SPC5 studio. My requirement is to use 4 UARTs. So, to enable that under 'SPC560BCxx Low Level Drivers Component RLA' option I
selected 4 UARTs and under 'Serial Driver Settings' option I chose buffer size as 1500. Now after generating the code, my controller is taking 1500 bytes as the input and output buffer size for all the 4 UARTs, which means a total of 12000 bytes RAM size is already taken by the code because of the 4 UARTs. But I only want one UART with 1500 bytes buffer size and the rest UARTswith 50 bytes. How do I select different buffer sizes for different UARTs?Regards,
Vishrut.
2018-02-18 10:03 AM
Suggest you use the automated code generation to output 50 and 1500 options, and then diff the code to see what changes and what/where things get configured.
If this leads you to understand that the driver code won't provide the level of flexibility you want, then you might have to code your own solution to handle the odd case.
2018-02-19 07:42 AM
Hello Vishrut ,
1500 Bytes for a buffer , it is very big for a microcontroller.
You can not change the configuration file generated :
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 64 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16U
#endif
/** @} */
�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
With the patch mode in SPC5Studio, you can patch the file serial_lld.c and add this flexibility by using others constants :
#define SERIAL_BUFFERS_SIZE1 1500
#define SERIAL_BUFFERS_SIZE2 50�?�?�?�?
Best regards
Erwan