2024-07-22 01:52 AM
I am using Baremetal.
On my custom board, I successfully loaded the driver for the OTG USB device as a printer. When it succeeded, the code size was small, so I worked on it as a test in the SYSRAM base without any issues (I did not use USBX).
However, as the code size increased, I needed to use DDR RAM. After executing the DEMO DDR INIT code, the previously successful code no longer proceeds at the following part.
In the PCD INIT function,
for (i = 0U; i < hpcd->Init.dev_endpoints; i++)
{
/* Init ep structure */
hpcd->IN_ep[i].is_in = 1U;
hpcd->IN_ep[i].num = i;
hpcd->IN_ep[i].tx_fifo_num = i;
/* Control until ep is activated */
hpcd->IN_ep[i].type = EP_TYPE_CTRL;
hpcd->IN_ep[i].maxpacket = 0U;
hpcd->IN_ep[i].xfer_buff = 0U;
hpcd->IN_ep[i].xfer_len = 0U;
}
it does not exit the for loop and keeps running continuously. Please explain why this issue occurs.