One of communication protocol use Serial.write and I'm facing problems with. Code is:
Code: Select all
//All other bytes can simply be copied from the config table
//npage_size is an int type
for (uint16_t x = 0; x < 64; x++)
response[x] = *((uint8_t *)pnt_configPage + (uint16_t)(x)); //Each byte is simply the location in memory of the configPage + the offset + the variable number (x)
Serial.write((uint8_t *)&response, sizeof(response));
This works on Arduino Mega and Teensy but it didn't work on STM32. Any idea why?
If I add a Serial.print(NULL) after Serial.write the USB serial gives a 65 bytes output.