Home > Developement Guide > FAQ |
FAQ |
HMS30C7202 : ADC LCD PMU PLL RESET SDRAM SMI MMC UART CAN SPI USB TIMER PWM PS2 KED GPIO APPLICATION |
HMS30C7201 : ADC PMU PLL ETC APPLICATION |
 |
Q1. What is the exact state of multi function IO pins during and after nRESET?It is clear that the primary function is active
(xEN = 0x0000) and the ports are inputs (xDIR = 0xFFFF). This can be seen in the tables in chapter 2.2.2.But for some ports the
primary function is output, not input.
Example:After reset, Port A is "Primary", which is KSCANO0..7 and KSCANI0..7. For KSCANO0..7, the table on p. 20 is empty
in the "Input" column.So what is the reset state of KSCANO0..7: input (because ADIR=0xFFFF), or output (because it is "Primary",
and Primary is output)?
|
|
|
|
|
 |
Q2. Does the port function setting with xEN override the xDIR setting? In other words: if I set e.g. PORTB1 to "Primary" (nUDTR),
is it then automatically set to "Output", no matter how the BDIR setting is?Or again in other words: if I select a port function
(Primary or Multifunction, not GPIO) which has a clear direction, must I to set the xDIR bit anyway?
|
|
|
|
|
 |
Q3. ADATA after a reset(ch.10.3.2.1): "All bits are cleared by a system reset".And: "On reads, the Data Register contains the
current status of correspondent port pins, whether they are configured as input or output".But after reset, all pins are inputs,
so reading them should return the input state,which is not necessarily 0. What is true?
|
|
|
|
|
 |
Q4. If I write to ADATA while a port is set as input, is the written value latched? The reason for this question: I want to program
a GPIO port for output and start with a H output level without any L glitch.There is a pull-up on the port.I think because ADATA
is 0x0000 after reset, the port will be L when I enable GPIO and set ADIR for output. So the better way would be: first set the port
bit in ADATA to 1, and then set the port to GPIO and ADIR for output. But: "Writing to a Data Register only affects the pins that are
configured as outputs". Does this mean that writing has no effect at all, or is there an output latch which keeps this value until
the port becomes actually an output?
|
|
|
|
|
 |
Q5. APOL(ch.10.3.2.7): "After accessing this register, the Edge Mode register should be cleared with the Clear register."Does
"access" mean read and write? Or only write ("After writing to this register,....")?Is it correct that the Clear register (ACLR?)
clears the Edge Mode register (AEDGE?), not ASTAT? AEDGE makes no sense to me.If I have to clear the interrupt after writing
to this register, shouldn't I better disable the interrupt in AMASK before writing to APOL? Otherwise, an interrupt will occur when
I write to APOL. But if I disable the interrupt, the bit in ASTAT will never be set "(masked interrupt is always 0)". So why do I
have to reset ASTAT?
|
|
|
|
|
 |
Q6. APOL(ch.10.3.2.7): does the APOL setting also have effect in edge mode?
|
|
|
|
|