Technical Reference Chapter 4 is confusing
Posted: Fri Jan 19, 2018 12:29 am
I am trying to understand how the GPIO Matrix and the IO_Mux work. I've spent several hours studying Chapter 4 but I still don't understand. One reason is that Chapter 4 has several errors in it (I think).
1. The chapter often refers to bits and fields of registers but doesn't say what register the bit or field is in.
2. Register names, bit names, and field names often don't match the names in the Tech Ref. They are close but because they are not exact it causes me to wonder if I am looking at the right register.
3. I can't find some of the registers. bit, and field names.
4. Examples would greatly help us understand this section.
Here are some specific sections that have these problems:
Section 4.2.2
Figure 8 - GPIO_SIG_xx_IN_SEL possibly should be IO_x_MCU_SEL?, what is GPIOx_MCU_SEL?, what is GPIOx_FUN_IE?
What is GPIO_ENABLE_DATA[x] in step 2?
In step 3, it says "Set function field to GPIO". Should say this is in register IO_x_MCU_SEL.
Section 4.2.3
Talks about the xx_FUN_IE register. I think this is the IO_X_FUN_IE register. I know this is picky but it is better to be consistent in naming, especially when the document is intended to teach new people about the operation of the chip.
Section 4.3.2
What is GPIO_ENABLE_DATA[x] in step 1?
Figure 9 - GPIOx_MCU_SEL is a field of the IO_MUX_X_REG, what is GPIOx_FUN_OE?
Other things:
It would be very helpful to have an example. For example, provide an example to make GPIO23 be an output for RMT channel 1. Show all the changes to all the registers, field, and bits. Provide another example showing input configuration. Provide another example showing configuration of direct I/O using the IO_Mux. Provide another example showing how to route an output from the RMT to the PCNT as well as to a GPIO.
Here is a big one. I am looking at the tech ref manual on a Mac (OS X). I don't know about the PC, but on the Mac I can search the PDF for certain text. I had hoped that I could search for "FUN_IE" and possibly determine if it was part of a register name or the name of a field in a register. Unfortunately it found it only in Figure 8...no where else. This make me think the label is wrong in Figure 8. However when I do another search for "IN_SEL" it finds that text in two places in Figure 8, but also no where else. In this case I know the search is wrong because "IN_SEL" is part of the name of several registers. Here's another search failure....if I search for "IN_INV_SEL" it finds nothing even though it is a bit in the GPIO_FUNCm_IN_SEL_REG. This may be a defect in the OS X PDF viewer but I think searching works well in other PDFs.
1. The chapter often refers to bits and fields of registers but doesn't say what register the bit or field is in.
2. Register names, bit names, and field names often don't match the names in the Tech Ref. They are close but because they are not exact it causes me to wonder if I am looking at the right register.
3. I can't find some of the registers. bit, and field names.
4. Examples would greatly help us understand this section.
Here are some specific sections that have these problems:
Section 4.2.2
Figure 8 - GPIO_SIG_xx_IN_SEL possibly should be IO_x_MCU_SEL?, what is GPIOx_MCU_SEL?, what is GPIOx_FUN_IE?
What is GPIO_ENABLE_DATA[x] in step 2?
In step 3, it says "Set function field to GPIO". Should say this is in register IO_x_MCU_SEL.
Section 4.2.3
Talks about the xx_FUN_IE register. I think this is the IO_X_FUN_IE register. I know this is picky but it is better to be consistent in naming, especially when the document is intended to teach new people about the operation of the chip.
Section 4.3.2
What is GPIO_ENABLE_DATA[x] in step 1?
Figure 9 - GPIOx_MCU_SEL is a field of the IO_MUX_X_REG, what is GPIOx_FUN_OE?
Other things:
It would be very helpful to have an example. For example, provide an example to make GPIO23 be an output for RMT channel 1. Show all the changes to all the registers, field, and bits. Provide another example showing input configuration. Provide another example showing configuration of direct I/O using the IO_Mux. Provide another example showing how to route an output from the RMT to the PCNT as well as to a GPIO.
Here is a big one. I am looking at the tech ref manual on a Mac (OS X). I don't know about the PC, but on the Mac I can search the PDF for certain text. I had hoped that I could search for "FUN_IE" and possibly determine if it was part of a register name or the name of a field in a register. Unfortunately it found it only in Figure 8...no where else. This make me think the label is wrong in Figure 8. However when I do another search for "IN_SEL" it finds that text in two places in Figure 8, but also no where else. In this case I know the search is wrong because "IN_SEL" is part of the name of several registers. Here's another search failure....if I search for "IN_INV_SEL" it finds nothing even though it is a bit in the GPIO_FUNCm_IN_SEL_REG. This may be a defect in the OS X PDF viewer but I think searching works well in other PDFs.