Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Not applicable
Hi all!
I'm testing the XMC1200-LED Kit with the RGB Board. I'm using DAVE 4.1.2.
Creating a project and using the LED_LAMP App was confusing me in following way.
I initialized the app to use 9 BCCU channels. Then I edited the Intensity of each channel (example that only 3 are fully on, rest off), but the LEDs on the board didn't show the expected result (wrong channels were on).
Having a look in the generated code in led_lamp_conf.c shows follwing lines:
.led = {(PDM_BCCU_t *) &PDM_BCCU_0, (PDM_BCCU_t *) &PDM_BCCU_8, (PDM_BCCU_t *) &PDM_BCCU_7,
(PDM_BCCU_t *) &PDM_BCCU_3, (PDM_BCCU_t *) &PDM_BCCU_2, (PDM_BCCU_t *) &PDM_BCCU_1},
.config = &LED_LAMP_0_config,
.linearwalk_prescaler = 0U,
.dim_div = 0U,
.dim_prescaler = 219U,
.no_of_leds_used = 9U,
.dim_engine = (DIM_BCCU_t *) &DIM_BCCU_0,
.dimming_used = true


I guess this maps LED channel 0 from the GUI to BCCU Channel 0, LED channel 1 from GUI to BCCU channel 8, LED channel 2 from GUI ot BCCU channel 7, etc.
I expect GUI channel 0 is BCCU 0, GUI channel 1 is BCCU 1...

Is there any reason for this "logic". For me its only confusing.
A screenshot of the DAVE App settings is attached (hope this makes it more clear)

best regards
1 Reply
Hi Carsten,

I am sorry to hear about the confusion 😞
Yes, DAVE does not assign the LED channel numbers in sequence. We are aware of this limitation and have provided this in the APP Help (Right-click LED_LAMP APP -> APP Help). This information is available under the "Usage" section, item no. 7 (Rename the APP instance label).
In your case above, the mapping is as follows:
PDM_BCCU_0 -> GUI LED channel 0
PDM_BCCU_8 -> GUI LED channel 1
PDM_BCCU_7 -> GUI LED channel 2
PDM_BCCU_1 -> GUI LED channel 8

Let me remind you that GUI LED channel 0 does NOT map to BCCU Channel 0. In case you intend to map GUI LED Channel 0 (PDM_BCCU_0) to BCCU channel 0, you can do so by:
1) Manually assign the output pin of PDM_BCCU_0 to an output pin of BCCU channel 0. (Right-click PDM_BCCU_0 APP -> Manual Pin Allocator)
2) Manually assign BCCU channel 0 to PDM_BCCU_0. (Right-click PDM_BCCU_0 APP -> Manual Resource Assignment)

Hope this helps.

Best Regards,