Agreed.  I've pushed the fix.

Cheers,
Karl P


On 04/08/2014 06:24 AM, Марко Краљевић wrote:
> Hi, I just 'ported' one of my programs to use the newer
> rcc_periph_clock_enable() instead of rcc_peripheral_enable_clock(). This is 
> on a
> F103VD.
>
> It seems to work in general, but the CAN enable seems to fail.
>
> rcc_periph_clock_enable(RCC_CAN);      /* fail */
> rcc_periph_clock_enable(RCC_CAN1);    /* fail */
> rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_CAN1EN); /* works */
>
> in related news, calling can_transmit() in this condition (no CAN clock) 
> returns
> success, which maybe it shouldn't..?
>
>
> Ah, took a browse and the problem looks like it is here, off by one bit:
>
> new:
> /* APB1 peripherals */
> [...]
> RCC_CAN = _REG_BIT(0x1C, 24),/*-N-*/
> RCC_CAN1 = _REG_BIT(0x1C, 24),/*--C*/
> RCC_CAN2 = _REG_BIT(0x1C, 25),/*--C*/
> [...]
>
> old:
>
>       #define     RCC_APB1ENR_CAN1EN   (1 << 25) /* (**) */
> #define     RCC_APB1ENR_CANEN    aliased to CAN1
> #define     RCC_APB1ENR_CAN2EN   (1 << 26) /* (**) */
>
> regards,
> mark
>
>       
>
>
>       
>
>
>
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
>
>
>
> _______________________________________________
> libopencm3-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
libopencm3-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel

Reply via email to