char buffer[20];//receive data use
int len = 0;//receive data use
void UARTh(void);
void System_init(void);
int main() {
CONSOLE.printf("I in attach\r\n");
ESP32.attach(&UARTh,Serial::RxIrq);
CONSOLE.printf("I NVIC_SetPriority\r\n");
NVIC_SetPriority(USART2_IRQn,1);//number smaller the priority is bigger
while(1)
{
}
The PA_2, PA_3 pins do not seem to be available at any of the DISCO-F746NG board’s header connectors CN4, CN5, CN6, CN7. How did you connect them to the ESP32?
According to the info in mbed-dev - mbed library sources. Supersedes mbed-src. | Mbed
the PA_3 (Rx) is connected also to USB ULPI_D0 [USB3320C-EZK_D0].
Even if you somehow managed to connect the ESP32 to the PA_2, PA_3 pins it could happen that the serial pulses arriving at the PA_3 (Rx) pin are somehow distorted by the USB peripheral device.
1.I use F746NG mcu not discovery board in online compiler use discovery F746NG
2. and this is connection method,There is no additional IC in between
3.The PA2 send data is true.
MCU ESP32
PA2 (Tx) -----> Rx
PA3 (Rx) -----> Tx
If you want to use a separate MCU (use st-link to Burn), do you have to change some configurations
When you’d like to program a separate MCU (not installed on a NUCLEO or DISCO board) then you have these options.
The configuration depends on whether the custom board hardware design matches the reference NUCLEO/DISCO board design. For example, If the custom board is equipped an external crystal and the reference design isn’t then you shall create a custom target (for example like this).