If am trying to Interface an external Accelerometer/Any other Peripheral(Such as Wifi Module) with the Nordic MCU(in DWM1001), will I be able to utilize PANS ? or should I build a new custom firmware from scratch ?
Hi @Abishek
yes PANS can be used with some external sensors. Which kind of bus do you want to use?
Cheers JK
Can I use i2c sensor?
E.g. MPU-6050 ?
I can’t read internal accelerometer (LIS2dh12) with my dwm-simple project…
I don’t know how to access and get the value of 3-axis value.
Can you help me?
Hi @el_0813
it should be doable. But you need to disable stationary mode detection so the I2C bus will not be handled internally by the PANS stack.
Cheers
JK
I had set stationary detection to fasle.
But when I initialize the TWI, it just reset and reset my dwm
void vTWI_Init (void)
{
// Set TWI bus to LIS2DH12 (accelerometer) to maximum supported
// bus speed with highest priority (for single threaded operation).
const nrf_drv_twi_config_t twi_config = {
.scl = 28,
.sda = 29,
.frequency = NRF_TWI_FREQ_400K,
.interrupt_priority = APP_IRQ_PRIORITY_HIGH,
};
twi_err_code = nrf_drv_twi_init(&m_twi, &twi_config, vEventHandler, NULL);
APP_ERROR_CHECK(twi_err_code);
nrf_drv_twi_enable(&m_twi);
}
I don’t know why …
Hi @el_0813
for the I2C you need to use PANS API functions - see the DWM1001-API-Guide.pdf in the MDEK documentation - chapters 5.3.41 dwm_i2c_read and 5.3.42 dwm_i2c_write .
Cheers
JK