I would like to know what is the maximum memory size for:
- RAM
- HEAP
and the maximum size for the receive buffer for Serial5
thank you for your answer, it is especially the buffer port serial5 which poses me problem because I use a esp-01 to recover an image via http, when the image is greater than 64k the program no longer works, so we are limited to 64k, I change the value of the receive buffer to 64000 on file Serial5.c, if I put a higher value it does not work, how to recover data greater than 64k via serial port.
long CHTTP::ReceiveData()
{
m_nRcvBufLen = 0;
unsigned int totalBytes = 0;
int retval = 0;
assert(RecvBuf);
if (RecvBuf == NULL) {
LOGERROR(ECSock::GetErrorText(ECSock::RECVBUF_IS_EMPTY));
while (true);
}
memset(RecvBuf, 0, BUFFER_SIZE);
while (m_client.available())
{
if (totalBytes >= BUFFER_SIZE)
{
LOGERROR(ECSock::GetErrorText(ECSock::LACK_OF_MEMORY));
while (true);
}
totalBytes += retval;
char c;
if ((c = m_client.read()) != -1) {
retval = 1;
memcpy(&RecvBuf[totalBytes], &c, retval);
}
}
m_nRcvBufLen = totalBytes;
RecvBuf[m_nRcvBufLen] = '\0';
LOGINFO1("Len data received: ", m_nRcvBufLen);
return m_nRcvBufLen;
}
while (m_client.available())
{
if (totalBytes >= BUFFER_SIZE)
{
LOGERROR(ECSock::GetErrorText(ECSock::LACK_OF_MEMORY));
while (true);
}
RecvBuff[totalBytes] = m_client.read);
totalBytes++;
}
Assuming you mean RX1 and TX1 on the Teensy (i.e. pins 0 and 1), those pins are used for the hardware serial1 port. They are NOT used for USB communications. On some other chips using the Arduino software, pins 0 and 1 indeed are used for both USB and the hardware serial port (such as the Arduino UNO, which has a separate chip that reads pins 0/1 and does USB), but not the Teensy 3.x and LC microprocessors.i can't use RX2/TX2 and RX3/TX3 because i use this pin with FT813, the RX1/TX1 is reserved for serial usb it seem ?