2016-06-28 06:30 PM
I've generated a test app using STM32Cube for a STM32F407 Discovery board and have been able to send and receive. I am now trying to port the code to run under microC/OS II. I have modified the ISR to include the uC/OS additions and have also replaced calls to HAL_Delay() with OSTimerDly() however the port is not being created for the ported project. Any ideas on what I'm missing? The MX_USB_DEVICE_Init doing all its calls with no error returns.
void STM32F4_InterruptController::OTG_FS_IRQHandler(void)
{ extern PCD_HandleTypeDef hpcd_USB_OTG_FS; OS_CPU_SR cpu_sr = 0; OS_ENTER_CRITICAL(); /* Tell uC/OS-II that we are starting an ISR */ OSIntNesting++; OS_EXIT_CRITICAL(); HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS); OSIntExit(); /* Tell uC/OS-II that we are leaving the ISR */ } ---------------------- Code fragment from startup task in uC/OS/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USB_DEVICE_Init(); HAL_Delay(1000); /* CDC port is visible at this point in stand alone but not in uC/OS II version */ uint8_t test_msg[]=''HELLO''; uint16_t size = strlen((char *)test_msg); /* Infinite loop to send data */ while (1) { ... #isr-ucosii #microc/os-ii #usb #cdc2016-06-29 08:12 AM
Hi newbill.jon,
Take a look to this user which may be helpful for you. Otherwise, check ucos projects with STM32 in github community like this that may be suitable for your need. -Hannibal-2016-07-20 09:25 AM