8000 pio usb working, though core1 is not fully run from SRAM just yet by hathach · Pull Request #18 · tannewt/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

pio usb working, though core1 is not fully run from SRAM just yet #18

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

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
pre-commit style
  • Loading branch information
hathach committed Jun 29, 2023
commit 7ef89c3e0c23f701dfa46118812aefb185614af3
10 changes: 5 additions & 5 deletions ports/raspberrypi/common-hal/usb_host/Port.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void __not_in_flash_func(core1_main)(void) {
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | // Processor clock.
SysTick_CTRL_ENABLE_Msk;

#if 0
#if 0
// Turn off flash access. After this, it will hard fault. Better than messing
// up CIRCUITPY.
MPU->CTRL = MPU_CTRL_PRIVDEFENA_Msk | MPU_CTRL_ENABLE_Msk;
Expand All @@ -68,10 +68,10 @@ static void __not_in_flash_func(core1_main)(void) {
MPU_RASR_ENABLE_Msk |
(0x1b << MPU_RASR_SIZE_Pos); // Size is 0x10000000 which masks up to SRAM region.
MPU->RNR = 7;
#endif
#endif

_core1_ready = true;
while(!usb_host_init) {
while (!usb_host_init) {
// Wait for USB host to be initialized.
}

Expand Down Expand Up @@ -121,8 +121,8 @@ void common_hal_usb_host_port_construct(usb_host_port_obj_t *self, const mcu_pin
// common_hal_mcu_processor_set_frequency(&dummy_mcu, 120000000);
// cpu_freq = common_hal_mcu_processor_get_frequency();
// if (cpu_freq != 120000000 && cpu_freq != 240000000) {
mp_raise_RuntimeError(translate("CPU clock must be multiple of 120 MHz"));
return;
mp_raise_RuntimeError(translate("CPU clock must be multiple of 120 MHz"));
return;
// }
}

Expand Down
0