bigtreetech / bigtreetech/Octopus-Max-EZ
Octopus Max EZ V1.0: Native USB CDC (Virtual COM Port) not working without external HSE crystal
- Dominant language
- C++
- Stars
- 114
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm trying to use the native USB port (USB-C) on my Octopus Max EZ V1.0 board (STM32H723ZET6 MCU) as a standard USB CDC device (Virtual COM Port). This is not for Marlin or Klipper — I just need a simple COM port over USB.
### Problem:
The board enumerates perfectly in DFU mode and firmware flashes successfully via dfu-util (PlatformIO). However, after resetting into normal run mode, Windows does not recognize the USB device. There is no connect sound, no "Unknown Device" error — just complete silence from the USB port.
### Background & Testing:
I've already done extensive testing with the STM32duino core team. The full discussion with maintainer fpistm is here: stm32duino/Arduino_Core_STM32#2999
Summary of what was tested:
* Firmware compiled successfully in both PlatformIO and Arduino IDE using the official STM32duino core.
* Applied the clock configuration patch from fpistm, including HSI48 clock source and `USE_USB_HS_IN_FS` flags.
* On his Nucleo-H723ZG board, fpistm disabled the external HSE crystal in software to simulate a board without a physical crystal. Even with HSE disabled, the USB port worked correctly. This proves that his clock patch is correct and that the HSI48 internal oscillator can support USB CDC on the STM32H723.
* Checked the official schematic (BIGTREETECH Octopus MAX EZ V1.0-SCH.pdf, page 4). The 25MHz HSE oscillator (Y1) is marked as NC (Not Connected) — the physical crystal is not populated on the production board.
### Statement from STM32duino maintainer fpistm:
In the discussion linked above, fpistm stated:
> "I think your issue is related to hardware issue around USB on the PCB but not to HSE."
This means that even the STM32 core maintainer suspects a PCB-level hardware problem, not just a missing crystal. The fact that the same code works on a Nucleo board with HSE software-disabled, but fails on the Octopus Max EZ, strongly suggests that the issue is specific to the PCB layout of this particular BTT board.
### Test code used:
```cpp
/*
Test firmware for STM32H723VET6 on BTT Octopus Max EZ
Clock patch by fpistm (STMicroelectronics)
Compiles in PlatformIO and Arduino IDE
*/
#include
extern "C" void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {};
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
while (!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_DIV1;
RCC_OscInitStruct.HSICalibrationValue = 64;
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 4;
RCC_OscInitStruct.PLL.PLLN = 34;
RCC_OscInitStruct.PLL.PLLP = 1;
RCC_OscInitStruct.PLL.PLLQ = 2;
RCC_OscInitStruct.PLL.PLLR = 2;
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
RCC_OscInitStruct.PLL.PLLFRACN = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
while(1);
}
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2
| RCC_CLOCKTYPE_D3PCLK1 | RCC_CLOCKTYPE_D1PCLK1;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) {
while(1);
}
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LPUART1 | RCC_PERIPHCLK_USB;
PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
PeriphClkInitStruct.PLL3.PLL3M = 32;
PeriphClkInitStruct.PLL3.PLL3N = 120;
PeriphClkInitStruct.PLL3.PLL3P = 2;
PeriphClkInitStruct.PLL3.PLL3Q = 8;
PeriphClkInitStruct.PLL3.PLL3R = 2;
PeriphClkInitStruct.PLL3.PLL3RGE = RCC_PLL3VCIRANGE_1;
PeriphClkInitStruct.PLL3.PLL3VCOSEL = RCC_PLL3VCOWIDE;
PeriphClkInitStruct.PLL3.PLL3FRACN = 0;
PeriphClkInitStruct.Lpuart1ClockSelection = RCC_LPUART1CLKSOURCE_PLL3;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
while(1);
}
}
void setup() {
delay(100);
Serial.begin(115200);
}
void loop() {
Serial.println("OK");
delay(1000);
}
```
```ini
[env:test]
platform = ststm32
framework = arduino
board = nucleo_h743zi
board_build.mcu = stm32h723vet6
board_build.f_cpu = 550000000L
build_flags =
-D HAL_PCD_MODULE_ENABLED
-D USBCON
-D USBD_USE_CDC
-D USE_USB_HS_IN_FS
-D USE_USB_HS
upload_protocol = dfu
monitor_speed = 115200
```
### Conclusion so far:
The native USB port on this board cannot work in device mode. The clock patch is correct and works on other STM32H723 hardware, but fails specifically on the Octopus Max EZ production board. The issue appears to be a hardware design flaw on the PCB itself, as suggested by the STM32 core maintainer.
### Question to the community:
Has anyone successfully used the native USB port on this board as a standard CDC or MIDI device without an external crystal? Is there a known hardware mod, a different clock configuration, or a workaround that makes it work?
Thank you for any help!
Contributor guide
No contributing guide indexed for this repository
Research direction
Review BIGTREETECH Octopus MAX EZ V1.0-SCH.pdf page 4 and the linked STM32duino discussion, then reproduce the behavior with the provided STM32H723 test firmware and PlatformIO configuration. Done means identifying whether the production board has a USB hardware or clock issue and documenting a confirmed hardware modification, clock configuration, or workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100