- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
how to connect 4 SPI as slaves the D200?
Los pines SPI son SPI_M_SS[3:0]
but the F1_SPI_M_SS1 is connected to BATTMON_1P8V_REF, How can I use it?
how to connect the SPI to multiple slaves?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
Forget about SSx pins. You can use any other as Slave Select. Just need to initialize required GPIO and control it in your spi transfer functions.
For example:
# define sx1272_csn_enable() qm_gpio_clear_pin(QM_GPIO_0, CSN_SX1272)
# define sx1272_csn_disable() qm_gpio_set_pin(QM_GPIO_0, CSN_SX1272)
void writeRegister(uint8_t addr, uint8_t value)
{
qm_spi_transfer_t polled_xfer_desc;
qm_spi_status_t status;
uint8_t spi_buf[2];
uint8_t rx_buf[2];
spi_buf[0] = addr | 0x80;
spi_buf[1] = value;
polled_xfer_desc.tx = spi_buf;
polled_xfer_desc.rx = rx_buf;
polled_xfer_desc.tx_len = 2;
polled_xfer_desc.rx_len = 2;
sx1272_csn_enable(); //SS pin LOW
qm_spi_transfer(QM_SPI_MST_0, &polled_xfer_desc, &status);
sx1272_csn_disable(); //SS pin HIGH
}

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page