Other Parts Discussed in Thread: MSPM0G3507
Tool/software:
Hi,
I am currently utilizing LP-MSPM0G3507 evaluation boards and provided i2c sample code to confirm operation, with my current evaluation setup listed below.
<Controller>
Device: LP-MSPM0G3507
Sample Project: i2c_controller_rw_multibyte_fifo_interrupts_LP_MSPM0G3507_nortos_ticlang
※Changes made to the .c code to save and display each interrupt and MBCNT value during runtime to inspect what is occurring and in what order following completion of the I²C communication.
※Changes made to the syscfg to enable internal pullups, alter the TX and RX FIFO trigger levels, and to add additional controller interrupts (Enabled Interrupts: RX Done, TX Done, RX FIFO trigger, TX FIFO trigger, RX FIFO Full, TX FIFO Empty, Addr/Data NACK, Start detection, Stop detection, Arbitration lost)
↓i2c_controller_rw_multibyte_fifo_interrupts.c↓
/* * Copyright (c) 2021, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "ti_msp_dl_config.h" #include <stdio.h> /* Maximum size of TX packet */ #define I2C_TX_MAX_PACKET_SIZE (16) /* Number of bytes to send to target device */ #define I2C_TX_PACKET_SIZE (16) /* Maximum size of RX packet */ #define I2C_RX_MAX_PACKET_SIZE (12) /* Number of bytes to received from target */ #define I2C_RX_PACKET_SIZE (12) /* I2C Target address */ #define I2C_TARGET_ADDRESS (0x48) /* Data sent to the Target */ uint8_t gTxPacket[I2C_TX_MAX_PACKET_SIZE] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F}; /**/ /* Counters for TX length and bytes sent */ uint32_t gTxLen, gTxCount; /* Data received from Target */ uint8_t gRxPacket[I2C_RX_MAX_PACKET_SIZE]; /* Counters for TX length and bytes sent */ uint32_t gRxLen, gRxCount; uint32_t gNumInterrupt; #define MAX_INTERRUPT_LOG 64 uint32_t gInterrupts[MAX_INTERRUPT_LOG]; uint32_t gIntArrayLen = MAX_INTERRUPT_LOG; uint32_t gFifo_status[MAX_INTERRUPT_LOG]; uint32_t gTransmit_data[MAX_INTERRUPT_LOG]; /* Indicates status of I2C */ enum I2cControllerStatus { I2C_STATUS_IDLE = 0, I2C_STATUS_TX_STARTED, I2C_STATUS_TX_INPROGRESS, I2C_STATUS_TX_COMPLETE, I2C_STATUS_RX_STARTED, I2C_STATUS_RX_INPROGRESS, I2C_STATUS_RX_COMPLETE, I2C_STATUS_ERROR, } gI2cControllerStatus; void delay_cycles_Debug(uint32_t cycles) { for (uint32_t i = 0; i < cycles; i++) { __asm("NOP"); } } int main(void) { SYSCFG_DL_init(); /* Set LED to indicate start of transfer */ DL_GPIO_setPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN); NVIC_EnableIRQ(I2C_INST_INT_IRQN); DL_SYSCTL_disableSleepOnExit(); gI2cControllerStatus = I2C_STATUS_IDLE; gTxLen = I2C_TX_PACKET_SIZE; /* * Fill the FIFO * The FIFO is 8-bytes deep, and this function will return number * of bytes written to FIFO */ gTxCount = DL_I2C_fillControllerTXFIFO(I2C_INST, &gTxPacket[0], gTxLen); /* Enable TXFIFO trigger interrupt if there are more bytes to send */ if (gTxCount < gTxLen) { DL_I2C_enableInterrupt( I2C_INST, DL_I2C_INTERRUPT_CONTROLLER_TXFIFO_TRIGGER); } else { DL_I2C_disableInterrupt( I2C_INST, DL_I2C_INTERRUPT_CONTROLLER_TXFIFO_TRIGGER); } /* * Send the packet to the controller. * This function will send Start + Stop automatically. */ gI2cControllerStatus = I2C_STATUS_TX_STARTED; while (!( DL_I2C_getControllerStatus(I2C_INST) & DL_I2C_CONTROLLER_STATUS_IDLE)) ; DL_I2C_startControllerTransfer( I2C_INST, I2C_TARGET_ADDRESS, DL_I2C_CONTROLLER_DIRECTION_TX, gTxLen); /* Wait until the Controller sends all bytes */ while ((gI2cControllerStatus != I2C_STATUS_TX_COMPLETE) && (gI2cControllerStatus != I2C_STATUS_ERROR)) { __WFE(); } while (DL_I2C_getControllerStatus(I2C_INST) & DL_I2C_CONTROLLER_STATUS_BUSY_BUS) ; /* Trap if there was an error */ if (DL_I2C_getControllerStatus(I2C_INST) & DL_I2C_CONTROLLER_STATUS_ERROR) { /* LED will remain high if there is an error */ __BKPT(0); } while (!( DL_I2C_getControllerStatus(I2C_INST) & DL_I2C_CONTROLLER_STATUS_IDLE)) ; /* Add delay between transfers */ delay_cycles_Debug(10000); /* Send a read request to Target */ gRxLen = I2C_RX_PACKET_SIZE; gRxCount = 0; gI2cControllerStatus = I2C_STATUS_RX_STARTED; DL_I2C_startControllerTransfer( I2C_INST, I2C_TARGET_ADDRESS, DL_I2C_CONTROLLER_DIRECTION_RX, gRxLen); /* Wait for all bytes to be received in interrupt */ while (gI2cControllerStatus != I2C_STATUS_RX_COMPLETE) { __WFE(); } while (DL_I2C_getControllerStatus(I2C_INST) & DL_I2C_CONTROLLER_STATUS_BUSY_BUS) ; /* If write and read were successful, toggle LED */ while (1) { __WFI(); if(gInterrupts[0] != 0x0){ for(int i = 0; i < gIntArrayLen; i++){ if(gInterrupts[i] != 0x0){ if(gInterrupts[i] == 0x01){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MRXDONEFG"); }else if(gInterrupts[i] == 0x02){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MTXDONEFG"); }else if(gInterrupts[i] == 0x03){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MRXFIFOTRG"); }else if(gInterrupts[i] == 0x04){ printf("Interrupt #%i: 0x%x | %s | counter %d", i, gInterrupts[i], "MTXFIFOTRG", gFifo_status[i]); }else if(gInterrupts[i] == 0x05){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MRXFIFOFULL"); }else if(gInterrupts[i] == 0x06){ printf("Interrupt #%i: 0x%x | %s | counter %d", i, gInterrupts[i], "MTX_EMPTY" ,gFifo_status[i]); }else if(gInterrupts[i] == 0x08){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MNACKFG"); }else if(gInterrupts[i] == 0x09){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MSTARTFG"); }else if(gInterrupts[i] == 0x0A){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MSTOPFG"); }else if(gInterrupts[i] == 0x0B){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MARBLOSTFG"); }else if(gInterrupts[i] == 0x0C){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MDMA_DONE_TX"); }else if(gInterrupts[i] == 0x0D){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MDMA_DONE_RX"); }else if(gInterrupts[i] == 0x0E){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "MPEC_RX_ERR"); }else if(gInterrupts[i] == 0x0F){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "TIMEOUTA"); }else if(gInterrupts[i] == 0x10){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "TIMEOUTB"); }else if(gInterrupts[i] == 0x11){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SRXDONEFG"); }else if(gInterrupts[i] == 0x12){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "STXDONEFG"); }else if(gInterrupts[i] == 0x13){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SRXFIFOTRG"); }else if(gInterrupts[i] == 0x14){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "STXFIFOTRG"); }else if(gInterrupts[i] == 0x15){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SRXFIFOFULL"); }else if(gInterrupts[i] == 0x16){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "STXEMPTY"); }else if(gInterrupts[i] == 0x17){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SSTARTFG"); }else if(gInterrupts[i] == 0x18){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SSTOPFG"); }else if(gInterrupts[i] == 0x19){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SGENCALL"); }else if(gInterrupts[i] == 0x1A){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SDMA_DONE_TX"); }else if(gInterrupts[i] == 0x1B){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SDMA_DONE_RX"); }else if(gInterrupts[i] == 0x1C){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SPEC_RX_ERR"); }else if(gInterrupts[i] == 0x1D){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "STX_UNFL"); }else if(gInterrupts[i] == 0x1E){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SRX_OVFL"); }else if(gInterrupts[i] == 0x1F){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "SARBLOST"); }else if(gInterrupts[i] == 0x20){ printf("Interrupt #%i: 0x%x | %s", i, gInterrupts[i], "INTR_OVFL"); } fflush(stdout); gInterrupts[i] = 0x00; } } gNumInterrupt = 0; printf("Done printing\n\n"); fflush(stdout); } } } void I2C_INST_IRQHandler(void) { uint32_t curInterrupt = DL_I2C_getPendingInterrupt(I2C_INST); gInterrupts[gNumInterrupt] = curInterrupt; gFifo_status[gNumInterrupt]= I2C_INST->MASTER.MSR; gFifo_status[gNumInterrupt] = gFifo_status[gNumInterrupt] << 4; gFifo_status[gNumInterrupt] = gFifo_status[gNumInterrupt] >> 20; gTransmit_data[gNumInterrupt] = I2C_INST->MASTER.MTXDATA; gNumInterrupt++; switch (curInterrupt) { case DL_I2C_IIDX_CONTROLLER_RX_DONE: gI2cControllerStatus = I2C_STATUS_RX_COMPLETE; break; case DL_I2C_IIDX_CONTROLLER_TX_DONE: DL_I2C_disableInterrupt( I2C_INST, DL_I2C_INTERRUPT_CONTROLLER_TXFIFO_TRIGGER); gI2cControllerStatus = I2C_STATUS_TX_COMPLETE; break; case DL_I2C_IIDX_CONTROLLER_RXFIFO_TRIGGER: gI2cControllerStatus = I2C_STATUS_RX_INPROGRESS; /* Receive all bytes from target */ while (DL_I2C_isControllerRXFIFOEmpty(I2C_INST) != true) { if (gRxCount < gRxLen) { gRxPacket[gRxCount++] = DL_I2C_receiveControllerData(I2C_INST); } else { /* Ignore and remove from FIFO if the buffer is full */ DL_I2C_receiveControllerData(I2C_INST); } } break; case DL_I2C_IIDX_CONTROLLER_TXFIFO_TRIGGER: gI2cControllerStatus = I2C_STATUS_TX_INPROGRESS; /* Fill TX FIFO with next bytes to send */ if (gTxCount < gTxLen) { gTxCount += DL_I2C_fillControllerTXFIFO( I2C_INST, &gTxPacket[gTxCount], gTxLen - gTxCount); } break; /* Not used for this example */ case DL_I2C_IIDX_CONTROLLER_ARBITRATION_LOST: case DL_I2C_IIDX_CONTROLLER_NACK: if ((gI2cControllerStatus == I2C_STATUS_RX_STARTED) || (gI2cControllerStatus == I2C_STATUS_TX_STARTED)) { /* NACK interrupt if I2C Target is disconnected */ gI2cControllerStatus = I2C_STATUS_ERROR; } case DL_I2C_IIDX_CONTROLLER_RXFIFO_FULL: case DL_I2C_IIDX_CONTROLLER_TXFIFO_EMPTY: case DL_I2C_IIDX_CONTROLLER_START: case DL_I2C_IIDX_CONTROLLER_STOP: case DL_I2C_IIDX_CONTROLLER_EVENT1_DMA_DONE: case DL_I2C_IIDX_CONTROLLER_EVENT2_DMA_DONE: default: break; } }
↓i2c_controller_rw_multibyte_fifo_interrupts.syscfg↓
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "MSPM0G350X" --part "Default" --package "LQFP-64(PM)" --product "mspm0_sdk@2.05.01.01"
* @v2CliArgs --device "MSPM0G3507" --package "LQFP-64(PM)" --product "mspm0_sdk@2.05.01.01"
* @versions {"tool":"1.24.0+4110"}
*/
/**
* Import the modules used in this configuration.
*/
const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
const GPIO1 = GPIO.addInstance();
const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
const I2C1 = I2C.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
GPIO1.$name = "GPIO_LEDS";
GPIO1.port = "PORTA";
GPIO1.associatedPins.create(2);
GPIO1.associatedPins[0].$name = "USER_LED_1";
GPIO1.associatedPins[0].initialValue = "SET";
GPIO1.associatedPins[0].assignedPin = "0";
GPIO1.associatedPins[1].$name = "USER_TEST";
GPIO1.associatedPins[1].initialValue = "SET";
GPIO1.associatedPins[1].assignedPin = "15";
const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
Board.peripheral.$assign = "DEBUGSS";
Board.peripheral.swclkPin.$assign = "PA20";
Board.peripheral.swdioPin.$assign = "PA19";
I2C1.basicEnableController = true;
I2C1.$name = "I2C";
I2C1.advAnalogGlitchFilter = "DISABLED";
I2C1.intController = ["ARBITRATION_LOST","NACK","RXFIFO_FULL","RXFIFO_TRIGGER","RX_DONE","START","STOP","TXFIFO_EMPTY","TXFIFO_TRIGGER","TX_DONE"];
I2C1.advControllerRXFIFOTRIG = "BYTES_7";
I2C1.basicControllerBusSpeed = 400000;
I2C1.advControllerTXFIFOTRIG = "BYTES_7";
I2C1.peripheral.$assign = "I2C1";
I2C1.peripheral.sdaPin.$assign = "PB3";
I2C1.peripheral.sclPin.$assign = "PB2";
I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
I2C1.sdaPinConfig.hideOutputInversion = scripting.forceWrite(false);
I2C1.sdaPinConfig.onlyInternalResistor = scripting.forceWrite(false);
I2C1.sdaPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
I2C1.sdaPinConfig.enableConfig = true;
I2C1.sdaPinConfig.internalResistor = "PULL_UP";
I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
I2C1.sclPinConfig.hideOutputInversion = scripting.forceWrite(false);
I2C1.sclPinConfig.onlyInternalResistor = scripting.forceWrite(false);
I2C1.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
I2C1.sclPinConfig.enableConfig = true;
I2C1.sclPinConfig.internalResistor = "PULL_UP";
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL", {}, false);
SYSCTL.forceDefaultClkConfig = true;
SYSCTL.clockTreeEn = true;
/**
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
* re-solve from scratch.
*/
GPIO1.associatedPins[0].pin.$suggestSolution = "PA0";
GPIO1.associatedPins[1].pin.$suggestSolution = "PA15";
<Target>
Device: LP-MSPM0G3507
Sample Project: i2c_target_rw_multibyte_fifo_interrupts_LP_MSPM0G3507_nortos_ticlang
※No changes made to project
I am trying to understand how changes in the controller's TX FIFO Trigger Level affect the operation of the controller's sample project in order to better apply the M0's I²C to my own custom application.
Communication is succeeding between the boards, but I can't figure out what is determining the following:
- The number of times that MTXFIFOTRG occurs (esp. in respect to the TX FIFO Trigger Level)
- Why the MBCNT bits in I2Cx_MSR don't count down consistently when inspecting values present when interrupts occur
In addition to the answering what is causing/determining 1 and 2 above, could you also please teach me what is causing MTXFIFOTRG to occur an unexpected but specific number of times, and what when/by how much the MBCNT bits in I2Cx_MSR are supposed to be updated?
To illustrate my above questions, I have provided results from a few executions using different TX FIFO Trigger Levels below. Each case the FIFO is 8 bytes deep and 16 bytes are sent.
A. Controller TX FIFO Trigger Level: TX FIFO contains <= 7 bytes
- MBCNT counts down by 1 or 7 depending on the timing (see interrupt order below)
- Excluding interrupt #0, MTXFIFOTRG occurred 9 times.
- Interrupt order
- CORTEX_M0P: Interrupt #0: 0x4 | MTXFIFOTRG | MBCNT 0
CORTEX_M0P: Interrupt #1: 0x6 | MTX_EMPTY | MBCNT 0
CORTEX_M0P: Interrupt #2: 0x9 | MSTARTFG
CORTEX_M0P: Interrupt #3: 0x4 | MTXFIFOTRG | MBCNT 16
CORTEX_M0P: Interrupt #4: 0x4 | MTXFIFOTRG | MBCNT 15
CORTEX_M0P: Interrupt #5: 0x4 | MTXFIFOTRG | MBCNT 14
CORTEX_M0P: Interrupt #6: 0x4 | MTXFIFOTRG | MBCNT 13
CORTEX_M0P: Interrupt #7: 0x4 | MTXFIFOTRG | MBCNT 12
CORTEX_M0P: Interrupt #8: 0x4 | MTXFIFOTRG | MBCNT 11
CORTEX_M0P: Interrupt #9: 0x4 | MTXFIFOTRG | MBCNT 10
CORTEX_M0P: Interrupt #10: 0x4 | MTXFIFOTRG | MBCNT 9
CORTEX_M0P: Interrupt #11: 0x4 | MTXFIFOTRG | MBCNT 8
CORTEX_M0P: Interrupt #12: 0x6 | MTX_EMPTY | MBCNT 1
CORTEX_M0P: Interrupt #13: 0x2 | MTXDONEFG
CORTEX_M0P: Interrupt #14: 0xa | MSTOPFG
CORTEX_M0P: Interrupt #15: 0x9 | MSTARTFG
CORTEX_M0P: Interrupt #16: 0x3 | MRXFIFOTRG
CORTEX_M0P: Interrupt #17: 0x1 | MRXDONEFG
CORTEX_M0P: Interrupt #18: 0xa | MSTOPFG
CORTEX_M0P: Done printing
- CORTEX_M0P: Interrupt #0: 0x4 | MTXFIFOTRG | MBCNT 0
B. Controller TX FIFO Trigger Level: TX FIFO contains <= 6 bytes
- MBCNT counts down by 1 or 6 depending on the timing (see interrupt order below)
- Excluding interrupt #0, MTXFIFOTRG occurred 5 times.
- Interrupt order
- CORTEX_M0P: Interrupt #0: 0x4 | MTXFIFOTRG | MBCNT 0
CORTEX_M0P: Interrupt #1: 0x6 | MTX_EMPTY | MBCNT 0
CORTEX_M0P: Interrupt #2: 0x9 | MSTARTFG
CORTEX_M0P: Interrupt #3: 0x4 | MTXFIFOTRG | MBCNT 15
CORTEX_M0P: Interrupt #4: 0x4 | MTXFIFOTRG | MBCNT 13
CORTEX_M0P: Interrupt #5: 0x4 | MTXFIFOTRG | MBCNT 11
CORTEX_M0P: Interrupt #6: 0x4 | MTXFIFOTRG | MBCNT 9
CORTEX_M0P: Interrupt #7: 0x4 | MTXFIFOTRG | MBCNT 7
CORTEX_M0P: Interrupt #8: 0x6 | MTX_EMPTY | MBCNT 1
CORTEX_M0P: Interrupt #9: 0x2 | MTXDONEFG
CORTEX_M0P: Interrupt #10: 0xa | MSTOPFG
CORTEX_M0P: Interrupt #11: 0x9 | MSTARTFG
CORTEX_M0P: Interrupt #12: 0x3 | MRXFIFOTRG
CORTEX_M0P: Interrupt #13: 0x1 | MRXDONEFG
CORTEX_M0P: Interrupt #14: 0xa | MSTOPFG
CORTEX_M0P: Done printing
- CORTEX_M0P: Interrupt #0: 0x4 | MTXFIFOTRG | MBCNT 0
C. Controller TX FIFO Trigger Level: TX FIFO contains <= 1 byte
- MBCNT counts down by 1 or 8 depending on the timing (see interrupt order below)
- Excluding interrupt #0, MTXFIFOTRG occurred 3 times.
- Interrupt order
- CORTEX_M0P: Interrupt #0: 0x4 | MTXFIFOTRG | MBCNT 0
CORTEX_M0P: Interrupt #1: 0x6 | MTX_EMPTY | MBCNT 0
CORTEX_M0P: Interrupt #2: 0x9 | MSTARTFG
CORTEX_M0P: Interrupt #3: 0x4 | MTXFIFOTRG | MBCNT 10
CORTEX_M0P: Interrupt #4: 0x4 | MTXFIFOTRG | MBCNT 3
CORTEX_M0P: Interrupt #5: 0x4 | MTXFIFOTRG | MBCNT 2
CORTEX_M0P: Interrupt #6: 0x6 | MTX_EMPTY | MBCNT 1
CORTEX_M0P: Interrupt #7: 0x2 | MTXDONEFG
CORTEX_M0P: Interrupt #8: 0xa | MSTOPFG
CORTEX_M0P: Interrupt #9: 0x9 | MSTARTFG
CORTEX_M0P: Interrupt #10: 0x3 | MRXFIFOTRG
CORTEX_M0P: Interrupt #11: 0x1 | MRXDONEFG
CORTEX_M0P: Interrupt #12: 0xa | MSTOPFG
CORTEX_M0P: Done printing
- CORTEX_M0P: Interrupt #0: 0x4 | MTXFIFOTRG | MBCNT 0
Please let me know if you need any additional information.
Thanks,
Michael