Hello, I am trying to use CC60 and COUT60 on the XC167 to generate a simple PWM generation with CAPCOM6. I am debugging using the µVision3. My problem is that my program and the PWM signals runs well on the debugger, I see the pins values with Logic analyzer. However, the port pins P1L_P0 and P1L_P1 on the card remain low. With the same declarations (except ALTSEL) I received something on an other port (P7.P5). I have disabled the EBC (EBCMOD0 = 0x7430 & EBCMOD1 = 0x003F). The port pins are set to output everywhere in my program but still no output. With the reload values of these registers, the LED's (port 2)and the monitor(port 3) works fine, but when I enter the new values, they work no more. Where is the problem? Thanks
Did you use the Infineon DAvE to setup the PWN signal?
Hello yes I know this software and I used it to configure the PWM, but I think that the problem comes from the startup file which configure the EBC. Even if I just send one high impulse on one of the pins P1L, it doesn't work on the card, but it's OK in the simulation debugger.
How are you debugging? Are you using the Monitor or ULINK?
When I debug with the simulator, everythings works fine, I see curves in Logic Analyzer. But when I debug on the card, I do it with "ULINK driver for XC16x", without initialisation file( not the same as startup file), but there can't I see something in logic analyzer(it's normal) but nothing too on the oscilloscope.
The logic analyzer does not work with ULINK. There are several things that you need to take care of:
In SYSCON3 you must enable CAPCOM6 already done like all other capcom, timers, ADC... make sure that no BUS is enabled with P0 configuration resistors I am sorry but I don't understand it. EBC should not be disabled? because port 1L is used too for address ports. That's the problem because when I enable EBC(i means with address port) the monitor and the LED's work, but when I disable it both of these two peripherics have problems. The ALTSEL0P1x registers nicht to be correctly configured I think they are good: ALTSEL0P1L |= 0x003F; for CAPCOM6 ouputs CC60,61,62 COUT 60,61,62 and it is so everywhere (CCU6.c, IO.c) like P1L = 0x003F; DP1L = 0x003F;(this one is too in Main.c) Do you see the timers in the CAPCOM6 changing during debugging? yes, T12 and T13 are both changing in simulator debugger as well as with ULINK debugger.
Check if an explicit disable of the EBC (by setting the bit EBCDIS in START_V2.A66) helps.
Thanks for your help but that's already what I'm making, when I said that I enabled or disabled EBC, it was in the start_V2.A66 file. I know that my problem comes from this file but even with severals examples, I am not able to configure it correctly!
How are you starting the device? Is the /EA pin high (5V) or are you using a multiplexed bus with the proper settings for P0? If you still have some troubles and you want to post your email then I can send you a project that has the correct settings (start from internal flash) and generates a PWM (CC6) on P1L.0. -Chris
I acknowledge that I had difficulties to understand your answer, my knowledge of multiplexed bus is limited, and I had difficulties to find this /EA pin. So /EA pin is disabled, like default settings, and nothing works when I put this pin high (CAN, PWM, LEDs, Monitor), but I receive a rectangle signal on the port P1L!!!!! (strange...) What concerns the multiplexed bus, I don't use it because, when I disable the EBC in Dave (to permit to use the port 1L as GPIO), he disable automatically the bus type selection in chip select control. All of that makes me take a look at other things in start file and now I have an upgrade to my situation: I receive my PWM signal on P1L... BUT (lol!) now the CAN bus and the monitor don't work anymore!!! The mistake was that everythings was not disabled with EBC (one chip select register:FCONCS0 was still enable)(microcontroller is funny: you solve a problem and you have an other one immediatly!) Thanks for the answer for CAN node B, I will look at it after solving this problem. I am however interested with your example. Thanks a lot. Damien damien.genoist@daimlerchrysler.com
Ok, sent...