-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stm32f1 v0 #13
base: master
Are you sure you want to change the base?
Stm32f1 v0 #13
Conversation
I think this is some GPIO/clock config weirdness. Need to investigate.
@@ -70,6 +71,7 @@ STMLowLevelTimer::STMLowLevelTimer(TIM_TypeDef* timer, uint8_t irqn) : LowLevelT | |||
this->timer_instance = timer; | |||
this->irqN = irqn; | |||
memset(&TimHandle, 0, sizeof(TIM_HandleTypeDef)); | |||
disableIRQ(); |
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.
to remove
// USB_HP_CAN1_TX_IRQn | ||
// USB_LP_CAN1_RX_IRQn | ||
|
||
NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 5); |
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.
fix indent
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.
and ifdef
@@ -30,6 +30,7 @@ static ZSingleWireSerial *instances[4]; | |||
|
|||
static int enable_clock(uint32_t instance) | |||
{ | |||
DMESG("CLK EN"); |
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.
to remove
@@ -42,6 +43,11 @@ static int enable_clock(uint32_t instance) | |||
NVIC_SetPriority(USART2_IRQn, 2); | |||
NVIC_EnableIRQ(USART2_IRQn); | |||
return HAL_RCC_GetPCLK1Freq(); | |||
case USART3_BASE: | |||
__HAL_RCC_USART3_CLK_ENABLE(); | |||
DMESG("PCLK1 %d", HAL_RCC_GetPCLK1Freq()); |
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.
remove dmesg
pin_function(pin, pinmap_function(pin, PinMap_UART_TX)); | ||
pin_mode(pin,PullUp); |
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.
check this pin mode business
@@ -291,6 +299,7 @@ int ZSingleWireSerial::sendDMA(uint8_t* data, int len) | |||
this->bufLen = len; | |||
|
|||
int res = HAL_UART_Transmit_DMA(&uart, data, len); | |||
DMESG("TXDMA RES %d ",res); |
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.
remove
|
||
#ifndef USB | ||
USBx_DEVICE->DIEPEMPMSK &= ~0x1U << ep; | ||
|
||
while (!(USB_ReadDevInEPInterrupt(pcd.Instance, ep) & USB_OTG_DIEPINT_XFRC)) |
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.
check usb works overall
commits that enable jacdac-v0 on stm32f1