微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI Zigbee设计交流 > cc2650 use udma controller sample data by ssi bus

cc2650 use udma controller sample data by ssi bus

时间:10-02 整理:3721RD 点击:

1.//ssi config is right because CPU can read and write ssi bus through the 'board_spi_write'and 'board_spi_read'

void
board_spi_open(uint32_t bit_rate, uint32_t clk_pin)
{
  uint32_t buf;

  /* First, make sure the SERIAL PD is on */
  ti_lib_prcm_power_domain_on(PRCM_DOMAIN_SERIAL);
  while((ti_lib_prcm_power_domain_status(PRCM_DOMAIN_SERIAL)
        != PRCM_DOMAIN_POWER_ON));

  /* Enable clock in active mode */
  ti_lib_rom_prcm_peripheral_run_enable(PRCM_PERIPH_SSI0);
  ti_lib_prcm_load_set();
  while(!ti_lib_prcm_load_get());

  /* SPI configuration */
  ti_lib_ssi_int_disable(SSI0_BASE, SSI_RXOR | SSI_RXFF | SSI_RXTO | SSI_TXFF);
  ti_lib_ssi_int_clear(SSI0_BASE, SSI_RXOR | SSI_RXTO);
  ti_lib_rom_ssi_config_set_exp_clk(SSI0_BASE, ti_lib_sys_ctrl_clock_get(),
                                    SSI_FRF_MOTO_MODE_3,
                                    SSI_MODE_MASTER, bit_rate, 8);
  ti_lib_rom_ioc_pin_type_ssi_master(SSI0_BASE, BOARD_IOID_SPI_MISO,
                                     BOARD_IOID_SPI_MOSI, IOID_UNUSED, clk_pin);
  ti_lib_ssi_enable(SSI0_BASE);

  /* Get rid of residual data from SSI port */
  while(ti_lib_ssi_data_get_non_blocking(SSI0_BASE, &buf));
}

2.udma config file in the attachment.

The files used in the configuration process are udma.c udma.h ssi.c ssi.h

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

The file 'udma-sample ' config channel 0 and ssi0 tx-rx , the software channel is success,but the ssi has a question .

ssi interrupt  and dma interrupt are no configed successfully.

Help me .Thank you !

1.//ssi config is right because CPU can read and write ssi bus through the 'board_spi_write'and 'board_spi_read'

void
board_spi_open(uint32_t bit_rate, uint32_t clk_pin)
{
  uint32_t buf;

  /* First, make sure the SERIAL PD is on */
  ti_lib_prcm_power_domain_on(PRCM_DOMAIN_SERIAL);
  while((ti_lib_prcm_power_domain_status(PRCM_DOMAIN_SERIAL)
        != PRCM_DOMAIN_POWER_ON));

  /* Enable clock in active mode */
  ti_lib_rom_prcm_peripheral_run_enable(PRCM_PERIPH_SSI0);
  ti_lib_prcm_load_set();
  while(!ti_lib_prcm_load_get());

  /* SPI configuration */
  ti_lib_ssi_int_disable(SSI0_BASE, SSI_RXOR | SSI_RXFF | SSI_RXTO | SSI_TXFF);
  ti_lib_ssi_int_clear(SSI0_BASE, SSI_RXOR | SSI_RXTO);
  ti_lib_rom_ssi_config_set_exp_clk(SSI0_BASE, ti_lib_sys_ctrl_clock_get(),
                                    SSI_FRF_MOTO_MODE_3,
                                    SSI_MODE_MASTER, bit_rate, 8);
  ti_lib_rom_ioc_pin_type_ssi_master(SSI0_BASE, BOARD_IOID_SPI_MISO,
                                     BOARD_IOID_SPI_MOSI, IOID_UNUSED, clk_pin);
  ti_lib_ssi_enable(SSI0_BASE);

  /* Get rid of residual data from SSI port */
  while(ti_lib_ssi_data_get_non_blocking(SSI0_BASE, &buf));
}

2.udma config file in the attachment.

The files used in the configuration process are udma.c udma.h ssi.c ssi.h

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

The file 'udma-sample ' config channel 0 and ssi0 tx-rx , the software channel is success,but the ssi has a question .

ssi interrupt  and dma interrupt are no configed successfully.

Help me .Thank you !

建议您参考 https://e2e.ti.com/support/wireless_connectivity/low_power_rf_tools/f/155/t/628987 

并将问题发至E2E: https://e2e.ti.com/support/wireless_connectivity/low_power_rf_tools/f/155

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top