I have a CAN controller to 50 Kbps... and then I put this values to configure CAN:
Desired Baud rate= 20Kbps
Are these values correct?
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.
BRP = 2
TSEG1 = 11
TSEG2 = 4
Clock frequency = 24000kHz
Desired Baud Rate = 500Kbps
SJW = 1
Sample mode = 1-Sample
You can also go to the following link and download the project with this Application Note and try it.
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.
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
I use a CAN extended transmiter connected to CY8CKIT-017 and this to CY8CKIT-030.
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).
If my CAN transmitor has clock 16 Mhz, I must change Cypress project demo and I must modify BUS_CLK to 16Mhz?
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.
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
With BRP 39 Tseg1 5 and Tseg2 6, I think that it works ok
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.
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...