Post Go back to editing

ADSP-BF70x pin interrupt (PINTx) configuration/assignment and API

Thread Summary

The user sought clarification on the port mapping for PINTx (Pin Interrupt) registers in the BF70x microcontroller, specifically for enabling a pin interrupt on PC14. The support engineer confirmed that PINT1 or PINT2 can be used for PC14, with the upper half of Port C (PC14) mapped to either BYTE1 or BYTE3 of PINT1 or PINT2. The default configuration of PINTx_ASSIGN was explained, and the importance of setting the PINT_MSK_SET register correctly for the chosen byte was highlighted.
AI Generated Content

Hi,

from the documentation:


• PINT0 can sense pin activity on PORTA and PORTB

• PINT1 can sense pin activity on PORTB and PORTC

• PINT2 can sense pin activity on PORTC and PORTA

However, I don't fully understand the mapping of ports to the PINT_ASSIGN register. Can you please elaborate a bit on it? I'd like to have a pin interrupt on PC14. So if I get it right, I can assign the half port C half port to either bytes 3 or 0 of PINT1 or PINT2. Right?

What about the the byte mapping in PINT_ASSIGN? What does "PA" and "PB" stand for in the case of PINT0, PINT1 and PINT2, i.e. which port is the "A" and which one is the "B"? This seems especially confusing for PINT1 and PINT2.

Does the Analog Devices API adi_gpio_* take care of this? It seems tha the default configuration value of PINTx_ASSIGN is 0b00 00 01 01, which means a mapping of:

byte 3 = PA.H

byte 2 = PA.L

byte 1 = PB.H

byte 0 = PB.L

My guess is that the default assignment is as follows:

PINT0:

byte 3 = Port A.H

byte 2 = Port A.L

byte 1 = Port B.H

byte 0 = Port B.L

PINT1:

byte 3 = Port B.H

byte 2 = Port B.L

byte 1 = Port C.H

byte 0 = Port C.L

PINT2:

byte 3 = Port C.H

byte 2 = Port C.L

byte 1 = Port A.H

byte 0 = Port A.L

Using ADI_GPIO_PIN_INTERRUPT_1 with the API works for me, ADI_GPIO_PIN_INTERRUPT_2 does not.

If my interpretation is right, one can only use:

PINT0 for Port B,

PINT1 for Port C,

PINT2 for Port A.

At least with this configuration. Am I right?

Thanks.

Parents
  • Hi Matthias,

     

     Yes, in the BF70x, 

     

    • PINT0 can sense pin activity on PORTA and PORTB

    • PINT1 can sense pin activity on PORTB and PORTC

    • PINT2 can sense pin activity on PORTC and PORTA

     

    I'd like to have a pin interrupt on PC14. So if I get it right, I can assign the half port C half port to either bytes 3 or 0 of PINT1 or PINT2. Right?

        >>No, you can assign byte 1 or 3 of PINT1 or PINT2.

    What about the the byte mapping in PINT_ASSIGN? What does "PA" and "PB" stand for in the case of PINT0, PINT1 and PINT2, i.e. which port is the "A" and which one is the "B"? This seems especially confusing for PINT1 and PINT2.

    >> Below image can be referred as PINTx Block Diagram. The ports are subdivided into 8-bit half ports, with lower and upper half 8-bit units. The PINTx_ASSIGN registers control the 8-bit multiplexers shown in the Block Diagram. Lower half units of eight pins can be forwarded to either byte 0 or byte 2 of either associated PINTx block. Upper half units can be forwarded to either byte 1 or byte 3 of the pin interrupts blocks, without further restrictions.

    When you select PORTA and PORTB  --> PA refers to PORTA and PB refers to PORTB in PINT0

    When you select PORTB and PORTC  --> PA refers to PORTB and PB refers to PORTC in PINT1

    When you select PORTC and PORTB  --> PA refers to PORTC and PB refers to PORTA in PINT2

    Now consider a scenario where you want to configure interrupt on Port C pin 14(PC14). You can select either PINT1 or PINT2. Assume you have selected PINT1 (PB is the reference you should go with), now the question is, should I go with BYTE1 or BYTE3. You can go with either BYTE1 or BYTE3, but make sure that the PINT_MSK_SET register is set properly. In case if you select BYTE1 (PBH) for Port C pin 14 (PC14), the corresponding pin interrupt unmask bit to be selected is PIQ14. Similarly for  BYTE3 (PBH) it is PIQ30.

     

    For your quick reference, PINTx register combination is given below.

    PINT0:

    BYTE3  = PA.H(Port A) or PB.H(Port B)

    BYTE2  = PA.L(Port A) or PB.L(Port B)

    BYTE1 = PA.H(Port A) or PB.H(Port B)

    BYTE0 =  PA.L(Port A) or  PB.L(Port B)

    PINT1:

    BYTE3  = PA.H(Port B) or PB.H(Port C)

     

    BYTE2  = PA.L(Port B) or PB.L(Port C)

     

    BYTE1 = PA.H(Port B) or PB.H(Port C)

     

    BYTE0 =  PA.L(Port B) or  PB.L(Port C)

    PINT2:

     

    BYTE3  = PA.H(Port C) or PB.H(Port A)

     

    BYTE2  = PA.L(Port C) or PB.L(Port A)

     

    BYTE1 = PA.H(Port C) or PB.H(Port A)

     

    BYTE0 =  PA.L(Port C) or  PB.L(Port A)

    Best Regards,

    Jithul

Reply
  • Hi Matthias,

     

     Yes, in the BF70x, 

     

    • PINT0 can sense pin activity on PORTA and PORTB

    • PINT1 can sense pin activity on PORTB and PORTC

    • PINT2 can sense pin activity on PORTC and PORTA

     

    I'd like to have a pin interrupt on PC14. So if I get it right, I can assign the half port C half port to either bytes 3 or 0 of PINT1 or PINT2. Right?

        >>No, you can assign byte 1 or 3 of PINT1 or PINT2.

    What about the the byte mapping in PINT_ASSIGN? What does "PA" and "PB" stand for in the case of PINT0, PINT1 and PINT2, i.e. which port is the "A" and which one is the "B"? This seems especially confusing for PINT1 and PINT2.

    >> Below image can be referred as PINTx Block Diagram. The ports are subdivided into 8-bit half ports, with lower and upper half 8-bit units. The PINTx_ASSIGN registers control the 8-bit multiplexers shown in the Block Diagram. Lower half units of eight pins can be forwarded to either byte 0 or byte 2 of either associated PINTx block. Upper half units can be forwarded to either byte 1 or byte 3 of the pin interrupts blocks, without further restrictions.

    When you select PORTA and PORTB  --> PA refers to PORTA and PB refers to PORTB in PINT0

    When you select PORTB and PORTC  --> PA refers to PORTB and PB refers to PORTC in PINT1

    When you select PORTC and PORTB  --> PA refers to PORTC and PB refers to PORTA in PINT2

    Now consider a scenario where you want to configure interrupt on Port C pin 14(PC14). You can select either PINT1 or PINT2. Assume you have selected PINT1 (PB is the reference you should go with), now the question is, should I go with BYTE1 or BYTE3. You can go with either BYTE1 or BYTE3, but make sure that the PINT_MSK_SET register is set properly. In case if you select BYTE1 (PBH) for Port C pin 14 (PC14), the corresponding pin interrupt unmask bit to be selected is PIQ14. Similarly for  BYTE3 (PBH) it is PIQ30.

     

    For your quick reference, PINTx register combination is given below.

    PINT0:

    BYTE3  = PA.H(Port A) or PB.H(Port B)

    BYTE2  = PA.L(Port A) or PB.L(Port B)

    BYTE1 = PA.H(Port A) or PB.H(Port B)

    BYTE0 =  PA.L(Port A) or  PB.L(Port B)

    PINT1:

    BYTE3  = PA.H(Port B) or PB.H(Port C)

     

    BYTE2  = PA.L(Port B) or PB.L(Port C)

     

    BYTE1 = PA.H(Port B) or PB.H(Port C)

     

    BYTE0 =  PA.L(Port B) or  PB.L(Port C)

    PINT2:

     

    BYTE3  = PA.H(Port C) or PB.H(Port A)

     

    BYTE2  = PA.L(Port C) or PB.L(Port A)

     

    BYTE1 = PA.H(Port C) or PB.H(Port A)

     

    BYTE0 =  PA.L(Port C) or  PB.L(Port A)

    Best Regards,

    Jithul

Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.