Mail Room

A sensor on PA0 fires interrupts whenever a new reading is available. Unlike a simple semaphore that only signals "something happened," each interrupt needs to deliver actual data to a processing task: a sequence number and a sensor value.

Your job: set up a FreeRTOS queue to carry structured messages from the interrupt handler to a consumer task. The consumer prints each message and exits when no more arrive.

The message struct has two fields: seq (uint8_t, starts at 1) and value (int16_t, always SENSOR_READING which is 100). The queue holds up to 8 messages.

The consumer prints one line per message in the form MSG:<seq>,<value> (seq counting up from 1, value as delivered in the message), in arrival order, then prints DONE once the stream ends. Example with 1 event: MSG:1,100 DONE

The ISR entry point is EXTI0_IRQHandler (IRQ number 6). Remember to clear the EXTI pending bit and use ISR-safe queue APIs.

The simulation runs for 500 ms of virtual time, and all required output must appear within that window.

Loading the interactive arena.