Just to help my son for a university examination, I need to port TinyCLR to a Disco-STM32F429ZI.
I’ve done the porting very easy and now it is working fine. No display code for the moment.
But I’ve a very stupid problem I can’t figure out why… The board has microusb port connected to OTG_HS (pin on port B) and not standard OTG_FS (on Port A).
#ifdef OTG_USE_HS
#define STM32F4_USB_DM_PINS { { PIN(B, 14), AF(12) } }
#define STM32F4_USB_DP_PINS { { PIN(B, 15), AF(12) } }
#define STM32F4_USB_VB_PINS { { PIN(B, 13), AF(12) } }
#define STM32F4_USB_ID_PINS { { PIN(B, 12), AF(12) } }
#else
#define STM32F4_USB_DM_PINS { { PIN(A, 11), AF(10) } }
#define STM32F4_USB_DP_PINS { { PIN(A, 12), AF(10) } }
#define STM32F4_USB_VB_PINS { { PIN(A, 9), AF(10) } }
#define STM32F4_USB_ID_PINS { { PIN(A, 10), AF(10) } }
#endif // OTG_USE_HS
The code is rearranged to accomodate OTG_HS instead of FS for the small modifications needed to setup it. The HS USB port is working fine, I can distribute code to board from VS2107, but I can’t debug code. As soon program start in VS the HS usb detach from windows and it shows “USB device not recognized”. Then resetting the discovery board the program deployed start normally and HS USB become normal.
This means probably a crash of TinyCLR. Obviously if I compile for OTG FS and attaching an usb connector to FS port everything works fine.
Someone has just some experience with OTG HS port and difference from OTG FS?
I coudn’t find any diff in registers used by TinyCLR reading STM32F4xx datasheet.