You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some questions based on the current implementation
Writing on RX (SOLVED)
Does it ever make sense to write on the RX line? I.e., is this method redundant?
Solved: I was misinterpreting the source code.
Reading from the RX
How would one read from the RX. Looking at the UART RX code, something like this might work:
// Block until SPI-M reports data is availablewhile !spim.read_ready(){}// SPI-Ms RX channellet rx = spim.rx();// Block until device reports ability to enqueuewhile !rx.can_enqueue(){}// Read the buffer from deviceunsafe{ rx.enqueue(buf)}// Block again until the transfer is completewhile rx.saddr().read().bits() != 0{}
Now the main question is, how to determine when data is ready to be read (read_ready).
The text was updated successfully, but these errors were encountered:
we can't implement the same functionality as read_ready() for SPIM since it does not have a VALID register to check for the data validity, however we can rely on can_enqueue() to some degree as it reads the transfer "pending" status in a channel.
@Aisha-KM @RHamalainen
Some questions based on the current implementation
Writing on RX(SOLVED)Does it ever make sense to write on the RX line? I.e., is this method redundant?Solved: I was misinterpreting the source code.
Reading from the RX
How would one read from the RX. Looking at the UART RX code, something like this might work:
Now the main question is, how to determine when data is ready to be read (
read_ready
).The text was updated successfully, but these errors were encountered: