--
You received this message because you are subscribed to the Google Groups "UAVCAN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavcan+unsubscribe@googlegroups.com.
To post to this group, send email to uav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/uavcan/de86877f-0ba6-43d8-825f-1a4fb5f03e17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Pavel,Thank you for your reply.To enable the CAN_Mode_LoopBack mode, Which parameter should I config during the initial process of libcanard? follows is my sw&hw initial code:static void swInit(void){int result = 0;CanardSTM32CANTimings timings;result = canardSTM32ComputeCANTimings(RCC_Clocks.PCLK1_Frequency, 1000000, &timings);if(result){__ASM volatile("BKPT #01");}result = canardSTM32Init(&timings, CanardSTM32IfaceModeNormal);if(result){__ASM volatile("BKPT #01");}canardInit(&g_canard, // Uninitialized library instanceg_canard_memory_pool, // Raw memory chunk used for dynamic allocationsizeof(g_canard_memory_pool), // Size of the above, in bytesonTransferReceived, // Callback, see CanardOnTransferReceptionshouldAcceptTransfer, // Callback, see CanardShouldAcceptTransferNULL);canardSetLocalNodeID(&g_canard, 100);}static void hwInit(void){RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);RCC_APB1PeriphClockCmd(RCC_APB1Periph_CAN1, ENABLE);GPIO_InitTypeDef GPIO_InitStructure;GPIO_PinAFConfig(CAN_GPIO_PORT, CAN_RX_SOURCE, CAN_AF_PORT);GPIO_PinAFConfig(CAN_GPIO_PORT, CAN_TX_SOURCE, CAN_AF_PORT);GPIO_InitStructure.GPIO_Pin = CAN_RX_PIN | CAN_TX_PIN;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(CAN_GPIO_PORT, &GPIO_InitStructure);}bin
在 2018年3月23日星期五 UTC+8下午5:13:45,Pavel Kirienko写道:
Hello,> can I test the UAVCAN communication like the CAN_Mode_LoopBack?Just send a message and receive it automation.Yes.> Can a common USB-CAN cable compatible the UAVCAN protocol?Yes.> Or I need a special cable for UAVCAN?UAVCAN is just a high-level protocol that works on top of CAN, just like CANopen, CANaerospace, DeviceNet, and so on.Pavel.
On Thu, Mar 22, 2018 at 2:47 PM, <liub...@gmail.com> wrote:
Hi Pavel,I am trying to create a node for bare metal on STM32F103 platform with libcanard.I referenced the basic tutorial project on https://kb.zubax.com/display/MAINKB/1.+Basic+tutorial, but I do not have a USB-CAN cable on the hand,can I test the UAVCAN communication like the CAN_Mode_LoopBack?Just send a message and receive it automation.Can a common USB-CAN cable compatible the UAVCAN protocol? Or I need a special cable for UAVCAN?Thanks.bin
--
You received this message because you are subscribed to the Google Groups "UAVCAN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavcan+un...@googlegroups.com.
To post to this group, send email to uav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/uavcan/de86877f-0ba6-43d8-825f-1a4fb5f03e17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "UAVCAN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavcan+unsubscribe@googlegroups.com.
To post to this group, send email to uav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/uavcan/e15eaa84-bc80-4ca7-854c-35d68ea9d33c%40googlegroups.com.