I am trying to interface with the MAX11198 simultaneous dual ADC over SPI. The ADC has two channels and I am able to read values from one channel at a time using the nRF52832 DK as a SPI master. Zotero is a free, easy-to-use software to help you collect, organize, cite, and share research for Windows PC The software is developed by an independent. The ADC has one CLK pin, one CNVST pin (conversion start, acts as chip select) and 2 DOUT pins. Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share research. I have set the conversion rate to 100kHz using a timer and PPI to toggle the CNVST at this rate. JavaScript 5. Ret_code_t ret_0 = nrf_drv_spi_xfer(&spi0, &xfer_0, NRF_DRV_SPI_FLAG_HOLD_XFER | NRF_DRV_SPI_FLAG_REPEATED_XFER ) To do the repeated SPI master read I use: I am reading 2000 samples from the ADC then stoppping sampling to do some processing of the data. Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. To read from both DOUT pins at once I am trying to use a SPI slave instance with its CLK and CS pins physically tied to CLK and CNVST of the SPI master instance. Zotero offers writers and publishers the highest level of organization and convenience. CMapTools Coaches Eyes - Not Approved CoachMePlus CobbleStone Contract. However, I cannot figure out how to set up repeated slave SPI reads like can be done with nrf_drv_spi_xfer() function and the NRF_DRV_SPI_FLAG_REPEATED_XFER flag. ZevRoss Spatial Analysis LLC Zive Zoho Corporation Zones LLC Zotero. There are more than 50 alternatives to Zotero for a variety of platforms, including Mac, Windows, Online / Web-based, iPhone and iPad. Spi_config_0.ss_pin = NRF_DRV_SPI_PIN_NOT_USED Spi_config_0.frequency = NRF_DRV_SPI_FREQ_8M Nrf_drv_spi_config_t spi_config_0 = NRF_DRV_SPI_DEFAULT_CONFIG Nrf_drv_spis_buffers_set(&spis, m_tx_buf, m_length, m_rx_buf_1, m_length) Void spis_event_handler(nrf_drv_spis_event_t event) Here are relevant functions from my project: I'm open to any suggestions on better ways to accomplish this or if anyone has used this part before with a Nordic MCU. Uint32_t gpiote_task_addr = nrf_drv_gpiote_out_task_addr_get(GPIO_OUTPUT_PIN_NUMBER) Nrf_drv_timer_extended_compare(&timer, NRF_TIMER_CC_CHANNEL0, 159, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, false) Nrf_drv_gpiote_out_config_t config = GPIOTE_CONFIG_OUT_TASK_TOGGLE(true) // Initialize highĮrr_code = nrf_drv_gpiote_out_init(GPIO_OUTPUT_PIN_NUMBER, &config) //CNVST Nrf_drv_spis_buffers_set(&spis, m_tx_buf_1, m_length, m_rx_buf_1, m_length) Spis_config.mosi_pin = APP_SPIS_MOSI_PIN ĪPP_ERROR_CHECK(nrf_drv_spis_init(&spis, &spis_config, spis_event_handler)) Spis_config.miso_pin = NRFX_SPIS_PIN_NOT_USED Nrf_drv_spis_config_t spis_config = NRF_DRV_SPIS_DEFAULT_CONFIG Nrf_drv_spi_xfer_desc_t xfer_0 = NRF_DRV_SPI_XFER_TRX(m_tx_buf, m_length, m_rx_buf_0, m_length) Spi_config_0.mosi_pin = NRF_DRV_SPI_PIN_NOT_USED ĪPP_ERROR_CHECK(nrf_drv_spi_init(&spi0, &spi_config_0, spi_event_handler, NULL))
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |