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

When the endian parameter of spi_init() is 1, there is no data on MOSI #121

Open
ZiyangYE opened this issue Mar 25, 2021 · 0 comments
Open

Comments

@ZiyangYE
Copy link

BUG REPORT

When the endian parameter of spi_init() is 1, there is no data on MOSI

Expected behavior

There should be data on MOSI

Actual behavior

No data on MOSI

Test code

fpioa_set_function(30,FUNC_SPI0_SS0);
fpioa_set_function(31,FUNC_SPI0_SCLK);
fpioa_set_function(32,FUNC_SPI0_D0);
fpioa_set_function(33,FUNC_SPI0_D1);

spi_init(SPI_DEVICE_0,SPI_WORK_MODE_0,SPI_FF_STANDARD,8,1);

spi_set_clk_rate(SPI_DEVICE_0,1000000);

uint8_t cmd[3];
uint8_t dat[2];

cmd[0]=0x01;
cmd[1]=0x02;
cmd[2]=0x03;

dat[0]=0x00;
dat[1]=0xFF;

spi_send_data_standard(SPI_DEVICE_0,SPI_CHIP_SELECT_0,cmd,3,dat,2);

Document version

Develop
06a2ea7

Hardware

KD233

System

standalone

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