36.6.10 Segments Mapping Function
By default the segments pins (SEG0:30) are automatically assigned according to the SEGSEL configuration in the SLCDC_MR. The unused SEG I/O pins are forced to be driven by a digital peripheral or can be used as I/O through the PIO controller.
The automatic assignment is performed if the segment mapping function is not used (SLCDC_SMR0 is cleared). The following table provides such assignments.
| SEGSEL | I/O Port in Use as Segment Driver | I/O Port Pin if SLCDC_SMR0 = 0 |
|---|---|---|
| 0 | SEG0 | SEG1:30 |
| 1 | SEG0:1 | SEG2:30 |
| ... | ... | ... |
| 29 | SEG0:29 | SEG30 |
| 30 | SEG0:29 | None |
Programming is straightforward in this mode but it prevents flexibility of use of the digital peripheral multiplexed on SEG0:30 especially when the number of segments to drive is close to the maximum (31).
For example, if SEGSEL is set to 29, only the digital peripheral associated to SEG30 can be used and none of the other digital peripherals multiplexed on SEG0:29 I/O can be used.
To offer a flexible selection of digital peripherals multiplexed on SEG0:30 the user can manually configure the SEG I/O pins to be driven by the SLCDC.
This is done by programming SLCDC_SMR0. As soon as their values differ from 0 the Segment Remapping mode is used.
When configuring a logic 1 at index n (n = 0..30) in SLCDC_SMR0, the SLCDC forces the SEGn I/O pin to be driven by a segment waveform. In this mode, the value of SEGSEL in SLCDC_MR is ignored.
In Remapping mode, the software dispatches the pixels into SLCDC_LMEMRx according to what is programmed in SLCDC_SMR0.
