XMC - BCCU as DAC

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

cross mob
Not applicable
Hi All,

I would like to use the BCCU to generate a reference level with the help of a low-pass filter. Does anyone have an example project on how to do this? I could not find any documentation on this, although it is mentioned to be possible in the BCCU app note. Can someone help me out here?

Regards
Enigma
0 Likes
2 Replies
Not applicable
Hi All,

I am still trying to make a reference with the BCCU unit and here is the code I am currently using

// the used pin
XMC_GPIO_SetMode(P1_5, XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT4);
// hopefully selects P1_5 to be HW0 control path to overide software. (Ref Man AB of XMC1300 :: 23-39, p1245)
PORT1->HWSEL = 0x00000400;
// DCLK_PS = 1, BCS = 1, FCLK_PS = 1, (Ref Man AB of XMC1300 :: 22-27, p1187)
BCCU0->GLOBCLK = 0x00018001;
// bypass dimming engines, (Ref Man AB of XMC1300 :: 22-42, p1196)
BCCU0_CH1->CHCONFIG = 0x00000080;
// set the intensity value which will determine the voltage output after RC filter
BCCU0_CH1->INTS = 0x800;
// Do a shadow transfer to update the register used in hardware
BCCU0->CHSTRCON = 0x00000002;


So I am trying to do this with pin P1_5. Following the reference manual, this is the procedure I should follow, well this fails and I have no idea why. My suspicion is that the shadow transfer is not working, since in the debug the registers are not updating (or so it seems). Can anyone give me some hint here.

Regards
Enigma
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Give a try to the following application note.

Best regards,
Jesus
0 Likes