Part Number: MSPM0G3519
Hello,
I'm working on a project using the MSPM0G3519 LaunchPad to read parallel digital outputs from Advantech ADAM I/O modules. I'd appreciate guidance on whether my current approach is viable or if I should be using a different peripheral strategy.
System Overview
- Source: ADAM digital I/O modules (parallel bit outputs)
- Host interface: UART to a PC terminal
- Goal: When the host PC sends a command byte to the ADAM module, capture the resulting bit pattern on the MSPM0's GPIO pins and echo it back over UART.
Current Implementation
- Each ADAM output bit is wired to a separate MSPM0 GPIO pin.
- Each of those GPIOs is configured with a GPIO interrupt on both rising and falling edges.
- Inside the ISR I update a byte variable bit-by-bit and then transmit the assembled byte over UART.
- All GPIO ports are configured as pullup resistors.
Problem
The received byte does not match the transmitted command. Examples:
- Sending
0x75→ MSPM0 reports0xAA - Sending
0x01→ MSPM0 reports0xFF
Wiring has been verified multiple times, so I believe this is a timing / sampling issue rather than a connection problem. My suspicion is that using per-bit edge ISRs introduces enough jitter and ordering ambiguity that bits are being latched at the wrong times relative to one another.
Questions
- Is per-pin edge-triggered ISR the wrong approach for parallel bit capture on the MSPM0G3519?
- Does the MSPM0G3519 have a recommended peripheral (Timer Capture, DMA-triggered GPIO snapshot, or similar) for latching multiple GPIO bits simultaneously on an external event?
- Are there example projects or app notes for parallel data ingest on MSPM0 that you can point me to?
- Any known ISR latency figures I should account for when sampling asynchronous parallel signals?
Thank you