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

PSoC™ 4 Forum Discussions

Ex_CyPRO
Level 1
Level 1
First question asked Welcome!

Hi,

We are trying to get a Canbus speed of 1Mbps using a CY8C4247AZI-M485. So far, it's working only up to 125Kbps.

We followed the suggested design guidelines, which are: 24MHz crystal oscillator on pin P0.6 and a watch crystal on pins P0.4 and P0.5. The pins and clocks are well configured. But still no 1Mbps !

In case it matters, the PSoC4's supply is at 3.3Vdc

What did we do wrong ? Thanks !

can.PNGclk.PNG

0 Likes
4 Replies
Roy_Liu
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 5 questions asked

Hi,

How did you find "still no 1Mbps"?  Using CAN analyzer? From the "Configure CAN" picture, the desired baud rate is set to 1Mbps already. 

Roy Liu
0 Likes
AmB
Level 1
Level 1
First reply posted Welcome!

Hi, 

We are using a digital oscilloscope to monitor the CAN bus. When the bit rate is configured to 125kbps or lower, it's working.

It's not working for higher baud rates.

Thanks,

AB

0 Likes
BiBi_1928986
Level 7
Level 7
500 replies posted 250 replies posted 250 sign-ins

Hello.

Based on the Technical Reference Manual (TRM) (section 17.8.1) for this device, the EXT CLK is not supported for CAN.

"To meet the accurate clocking requirements of the CAN block, either use IMO with the 32kHz WCO PLL lock or route an accurate external clock into the device and use it as the SYSCLK source. Note that use of the external MHz crystal as a clock source is not supported by the PSoC 4200M device family."

So, in the Clock config tab, I would un-check the EXTCLK.

In order to use the WCO trim, you have the correct setting Trim with WCO.
Now, you have to observe the rules of waiting 500ms before enabling this trim feature as described in TRM section 8.2.4.
"The IMO trimming logic of the WCO can be enabled by the use of the DPLL_ENABLE bit of the WCO_CONFIG. The user firmware, when using this feature, must make sure that there is a minimum time of 500ms between the WCO enable and the DPLL_ENABLE event."

I don't know if Creator starts WCO when it's check box is checked, or if you have to explicitly start it.  In either case, you have to set the DPLL_ENABLE bit in the WCO_Config register 500ms after WCO is enabled.  I can't find the 4200M Register manual, so I can't tell you which bit to set.

I would actually start by getting CAN to operate at 1Meg without worrying about the accuracy yet.  Once you achieve that, then start configuring the WCO clock.

0 Likes

Hi,

Thanks for your response.

we also tried with the EXTCLK unchecked  and IMO trimed with WCO. We set the DPLL_ENABLE bit ( bit 30 in WCO_CONFIG register)  in the firmware after 500ms from enabling WCO like mentioned in  the PsoC 4200M TRM document.

The CAN bus still not operating at 1Mbps ( only at 125kbsp and below).

AB

 

0 Likes