Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sw/example] add SLINK demo program #235

Merged
merged 4 commits into from
Dec 9, 2021
Merged

[sw/example] add SLINK demo program #235

merged 4 commits into from
Dec 9, 2021

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Dec 7, 2021

This PR adds a demo program for the SLINK module (sw/example/demo_slink; written for the updates from #236).
It provides an interactive UART console to trigger SLINK read/write transactions by hand:

<<< SLINK Access Test Program >>>

This program allows to create SLINK transfers by hand.
Type 'help' to see the help menu.

SLINK_ACCESS:> help
Available commands:
 help     - show this text
 status   - show SLINK HW status
 setup    - configure SLINK module
 read     - read from SLINK channel
 write    - write to SLINK channel
 irq_mode - toggle SLINK IRQ mode
 irq_en   - toggle SLINK IRQ enable
 reset    - reset SLINK module

Configure the SLINK module using 'setup'. Then transfer data using 'read' and 'write'.

SLINK_ACCESS:> setup
Select SLINK access mode:
 n: non-blocking access -> check SLINK status flags before access
 b: blocking access     -> raise an exception on invalid access request
Select: n

SLINK_ACCESS:> status
Hardware configuration
 TX links: 1
 RX links: 1
 TX FIFO:  8 entries
 RX FIFO:  8 entries

SLINK status:
 Link status: 0x00000100
 IRQ config.: 0x00000000

SLINK_ACCESS:> write
Enter TX channel ID (0..0): 0
Enter TX data (8 hex chars): 0xCAFE1234
Writing '0xcafe1234' to TX channel 0...
Write successful.

SLINK_ACCESS:> read
Enter RX channel ID (0..0): 0
Reading from RX channel 0...
RX data: 0xcafe1234

SLINK_ACCESS:>

@stnolting stnolting added the SW software-related label Dec 7, 2021
@stnolting stnolting self-assigned this Dec 7, 2021
@stnolting stnolting marked this pull request as ready for review December 9, 2021 06:24
@stnolting stnolting merged commit 490f0fe into master Dec 9, 2021
@stnolting stnolting deleted the add_slink_demo branch December 9, 2021 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SW software-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant