- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I have CY8CKIT-030 board kit and CY8CKIT-017 CAN board, I try to listen CAN communication and for this reason, I installed on my board the CAN example.
But CAN protocol is extended (29 bits), and Bitrate=50kbit, and I don't know where I must change CAN parameter to listen correctly.
In my example, the application return me Rx errors and I think that the problem is CAN configuration.
I changed differents parameter in CAN setup, but it doesn't work ok
Thank you in advanced
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a CAN controller to 50 Kbps... and then I put this values to configure CAN:
Settings
BRP=41
Tseg1=3
Tseg2=5
Calculator
24000KHz (disabled)
Desired Baud rate= 20Kbps
SJW=1
Sample Mode=1-Sample
Are these values correct?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I assume you are using two PSoC CY8CKIT-001s and two CY8CKIT-017s for the CAN communication. Make sure that the settings for CAN component in both the PSoCs are the same for 'Timing' tab.
Try these:
Settings
BRP = 2
TSEG1 = 11
TSEG2 = 4
Calculator
Clock frequency = 24000kHz
Desired Baud Rate = 500Kbps
SJW = 1
Sample mode = 1-Sample
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You can also go to the following link and download the project with this Application Note and try it.
http://www.cypress.com/?rID=37766
Another sample project is available within the PSoC Creator itself. Go to the Start page, in Examples and Kits section, choose Find Example Project. Program the CANExampleControl project in one PSoC and CANExampleRemote in the second PSoC.
Thanks,
Ranjith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use a CAN example, but the application return me Rx errors then I suppose that the problem is with timing parameters.
I don't know what values introduce to use a device 50 kbps and 12 Mhz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use a CAN extended transmiter connected to CY8CKIT-017 and this to CY8CKIT-030.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use the timing calculator to calculate the values. Just enter the desired baud rate. After that, the table below show possible values. Check the CAN component data sheet (page 5) for an explanation of these values.
I would suggest a setting of BRP=39, Tseg1=5, Tseg2=6. This gives a sample point right in the middle of the cycle.
For the 29 bit protocol, look at the data sheet again (page 12 ff). There you see that you need to configure the mailbox correctly (set it to Full=yes, IDE=yes, then you can enter a 29-bit address).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If my CAN transmitor has clock 16 Mhz, I must change Cypress project demo and I must modify BUS_CLK to 16Mhz?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The crystal frequency of the CAN bus master should not matter, only the baud rate. So when you have set the CAN component to the correct baud rate, you should be fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, It works fine with 125 Kbps, but could I configure Crypress project to use 50 Kbps?
In desired Baud rate options, there are posibilities: 1000, 800, 500, 250, 125, 62.5, 20, 10
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With BRP 39 Tseg1 5 and Tseg2 6, I think that it works ok
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Always choose the desired baud rate in the CAN component and select appropriate BRP, TSeg1 and Tseg2 from the drop down menu so that the sample point comes in the middle.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think it makes much sense to answer questions one year old. The person asking the question either has solved it by now or given up. And even if you do - provide _new_ information and don't repeat what has been said before...