-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! I would approve it once we are sure that these changes are not affecting the DataLogger
#define USB_PowerSwitchOn_Pin GPIO_PIN_6 | ||
#define USB_PowerSwitchOn_GPIO_Port GPIOG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the USB data logger still working properly?
It has happened to me once or twice that a pin is removed or no longer initialized after messing with CubeMX a bit. I may have accidentally toggled something that I did not mean to, but I did have to set the CubeMX settings again. In my case, the GPIO pin for the timestamp timer interrupt was not working properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check on that next time im in the shop, I'm pretty sure it is. The same thing as what happened in Project/DAQ_System/Core/Inc/stm32f4xx_it.h
might've happened here
void CAN1_RX0_IRQHandler(void); | ||
void CAN1_RX1_IRQHandler(void); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are interrupts for receiving CAN messages from the ECU now disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They seem to be on this version, I think I might've misclicked or something on CubeMx, fixed
hcan1.Init.Prescaler = 24; | ||
hcan1.Init.Prescaler = 12; | ||
hcan1.Init.Mode = CAN_MODE_NORMAL; | ||
hcan1.Init.SyncJumpWidth = CAN_SJW_1TQ; | ||
hcan1.Init.TimeSeg1 = CAN_BS1_3TQ; | ||
hcan1.Init.TimeSeg2 = CAN_BS2_3TQ; | ||
hcan1.Init.TimeSeg1 = CAN_BS1_11TQ; | ||
hcan1.Init.TimeSeg2 = CAN_BS2_2TQ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to document how you selected these parameters on the CubeMX settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
Summary
Communication from the STM32 to the Raspberry Pi (or any CAN connected device on the Communications line). Introduced a secondary queue as well as the Relay Thread, along with the necessary Mutex's. To debug the connection on the Pi there is this repository. It has been tested with an analog device and writes to a file accurate results.
Remarks
Before closing the branch I'm going to make some changes to the timing, trying to get as many data points to the Pi as possible.
Checks