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

SPI slave interface skip bytes. #127

Open
1 of 2 tasks
Winnaries opened this issue Sep 11, 2021 · 0 comments
Open
1 of 2 tasks

SPI slave interface skip bytes. #127

Winnaries opened this issue Sep 11, 2021 · 0 comments

Comments

@Winnaries
Copy link

Winnaries commented Sep 11, 2021

  • BUG REPORT
  • FEATURE REQUEST

Expected behavior

test_data[1024] values obtained from slave via READ_BLOCK should contains four repeats of numbers 0 to 255 and it should not skip any values.

Actual behavior

test_data[1024] values obtained from slave via READ_BLOCK skips 4 bytes for every 64 bytes sent. Already checked using Logic Analyzer.

/* intended */                  
idx            : [..., 62, 63, 64, 65, 66, 67, 68, 69, ...]
test_data[idx] : [..., 62, 63, 64, 65, 66, 67, 68, 69, ...]
                               ⌃⌃ 

/* actual */                   
idx            : [..., 62, 63, 64, 65, 66, 67, 68, 69, ...]
test_data[idx] : [..., 62, 63, 68, 69, 70, 71, 72, 73, ...]
                               ⌃⌃ 

Test code

Please follow this implementation https://github.com/kendryte/kendryte-standalone-demo/tree/develop/spi_slave, but instead of initializing test_data_temp[1024] values via master's WRITE_BLOCK, please initialize it in the slave itself.

Provide a Minimal, Complete, and Verifiable example which will reproduce the problem.

/* slave test_data init */
for (int i = 0; i < 1024; i++) {
    test_data_temp[i] = i % 256; 
}

Document version

I'm on branch develop.

Hardware

Sipeed M1W

System

linux_x86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant