本人正在试用该型芯片,需要基本的初始化和操作程序。谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
// Transmit data
GpioDataRegs.GPBDAT.bit.GPIO57 = 0;
////////////////写寄存器//////////
spi_xmit(0xD014);
// Wait until data is received
//while(SpiaRegs.SPIFFRX.bit.RXFFST !=1) { }
// Check against sent data
//rdata = SpiaRegs.SPIRXBUF;
delay_loop();
spi_xmit(0x000B);
GpioDataRegs.GPBDAT.bit.GPIO57 = 1;
// Wait until data is received
//////////////读寄存器///////////
GpioDataRegs.GPBDAT.bit.GPIO57 = 0;
spi_xmit(0x4814);
delay_loop();
spi_xmit(0x0000);
//while(SpiaRegs.SPIFFRX.bit.RXFFST !=4) { }
delay_loop();
result = SpiaRegs.SPIRXBUF;
// if(rdata != sdata) error();
GpioDataRegs.GPBDAT.bit.GPIO57 = 1;
//delay_loop();
你好,这是我配置寄存器然后读寄存器的指令 但是我读出来的寄存器值是有问题的,麻烦您帮我看一下