UPDATE: I have been able to test this with another STM32 board and it works. It looks like the STM32 board i was using was defective.
UPDATE: I have been able to test this with another STM32 board and it works. It looks like the STM32 board i was using was defective.