Topic

FAQ
Login Register
TLSR8359 SPI SLAVE 如何获取Master 发送过来的数据?
Apr 12, 2022 17:22

/

A

/A


使用8359 SDK中的SPI_SLAVE这个demo,8359作为slave 连接外部master设备。编译并写入固件,芯片能够读取到触发的中断信息。


_attribute_ram_code_sec_noinline_ void irq_handler(void)

{

irq_status = irq_get_src();

irq_status1 = reg_i2c_map_host_status;//spi slave can distinguish the operation host write or read.

if(irq_status & FLD_IRQ_HOST_CMD_EN)

{   

    if(irq_status1 & FLD_HOST_CMD_IRQ) //both host write & read trigger this status

    {

           reg_i2c_map_host_status = irq_status1; //clear all irq status

           spi_read_cnt ++; //for debug


spi_read_cnt 一直可以累加。但是该如何能够读到Master 发过来的数据?是否有相关代码和例程?谢谢!


1 replies
TL_Soyo Apr 13, 2022 09:37
0
/A
Related topics
No related topics