Hello and thank you for your reply, I had already seen that document, it is well written and very clear, that is why I am so confused on why this is not working. I am doing polling the ORIENT<2:0> bits and the flat bit to determine orientation on start up, we do not need an interrupt. I am polling register 0x0C during this test mode at every data ready interrupt, and displaying on a UART debug with the accel data. The accel data was clear and cogent, the flat bit tracked perfectly, but orient<2:0> never changed from 000b. Here is my config code, I added the defines in with comments to show you the values. Based on what I am reading it looks like it is blocking, but I am writing to, and verified the write, to set NO BLOCK. Is there a flag that tells if blocking is active? void AccelConfig(void){ // issue a reset // #define BMA253_RESET 0xB6 AccelWriteByte(BMA253_RST_ADDR, BMA253_RESET); CyDelay(5); // remove blocking and set orient mode to symetrical // #define No_block_Symmetrical 0x00 AccelWriteByte(BMA253_ORIENT_PARAM_ADDR,No_block_Symmetrical); // remove blocking and set orient mode to symetrical AccelWriteByte(BMA253_THETA_BLOCK_ADDR,No_block_Symmetrical); //start the sampling engine // #define Data_rate_7_81hz 0x08 AccelWriteByte(BMA253_BW_SELECT_ADDR, Data_rate_7_81hz); // configure the bandwidth // #define Data_Rdy_enable 0x01 AccelWriteByte(BMA253_INTR1_MAP_1, Data_Rdy_enable); // Map data ready to INT1 //AccelWriteByte(BMA253_DATA_CTRL_ADDR, Disable_Shadow); // use filtered data, set Shadow so that MSB/LSB data is locked and // Setup Slope interrupt AccelWriteByte(BMA253_INTR1_MAP_0, SLOPE_INT1); // Map slope int to INT1 AccelWriteByte(BMA253_SLOPE_THRES_ADDR, local_settings[LC_THR]); // set the threshold AccelWriteByte(BMA253_SLOPE_DUR_ADDR, MOTION_DURATION); // set the duration AccelWriteByte(BMA253_INTR_CTRL_ADDR, BMA253_LATCH_DURN_NON_LATCH); // no latching AccelWriteByte(BMA253_INTR_SET_ADDR, Ints_Drive_Config); // configure INTs push pull, active low; // enable the interrupts AccelWriteByte(BMA253_INTR_ENABLE0_ADDR,XYZ_MOTION_IN_ENA|Flat_detection_enable); // Enable the slope interrupt // enable flat detection AccelWriteByte(BMA253_INTR_ENABLE1_ADDR, New_data_enable); // Start new data interrupt // Start Accel Slope interrupt isr_Accel_StartEx(isr_ACCEL); isr_Accel_ClearPending(); Accel_ClearInterrupt(); DBG_PRINT_TEXT("\n\r Initialized Accelerometer for High G Motion detection"); return; } //Accelconfig polling code: DBG_PRINTF("\r XYZTB:%d,%d,%d ", xyztb[0], xyztb[1], xyztb[2]); AccelReadByte(BMA253_THETA_BLOCK_ADDR); temp = Accel_Byte; DBG_PRINTF("Max value is: %d ",valuemax); AccelReadByte(BMA253_STAT_ORIENT_HIGH_ADDR); temp = Accel_Byte; DBG_PRINTF("Orientation: %x ",temp);
... View more