M2S010-MAKER-KIT I2C + UART Sample Code

Hi, this is the fist time I learn FPGA. I use M2S010-MAKER-KIT.
Form the Getting Start Guide seemed complicated for me due to combine with FreeRTOS and WIFI and I didn’t have WIFI module on hand.
Does anyone have sample code practice to combine with I2C Light sensor and UART to update data on console?
Thank you very much!


The code for the I2C and UART peripherals in the example can be used without FreeRTOS or wifi with minimal modification.

For example, in the vTaskReadLightSensor function in i2c.c, you would only have to remove the infinite loop, replace the vTaskDelay functions with your own delay, and send the results to the console (UART0) instead of the RTOS task.

Just look for the functions with prefixes like MSS_UART_ or MSS_I2C_ which are the underlying drivers. You can ignore everything else.

1 Like