mirror of
https://github.com/whowechina/aic_pico.git
synced 2025-01-19 11:18:39 +01:00
Overclock SPI to 75MHz
This commit is contained in:
parent
ade3b0f1dd
commit
0ba0287ea2
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "hardware/gpio.h"
|
#include "hardware/gpio.h"
|
||||||
#include "hardware/sync.h"
|
#include "hardware/sync.h"
|
||||||
|
#include "hardware/clocks.h"
|
||||||
#include "hardware/structs/ioqspi.h"
|
#include "hardware/structs/ioqspi.h"
|
||||||
#include "hardware/structs/sio.h"
|
#include "hardware/structs/sio.h"
|
||||||
|
|
||||||
@ -330,6 +331,12 @@ static void core0_loop()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void spi_overclock()
|
||||||
|
{
|
||||||
|
uint32_t freq = clock_get_hz(clk_sys);
|
||||||
|
clock_configure(clk_peri, 0, CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLK_SYS, freq, freq);
|
||||||
|
}
|
||||||
|
|
||||||
static void identify_touch()
|
static void identify_touch()
|
||||||
{
|
{
|
||||||
gpio_init(AIC_TOUCH_EN);
|
gpio_init(AIC_TOUCH_EN);
|
||||||
@ -358,6 +365,8 @@ void init()
|
|||||||
keypad_init();
|
keypad_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spi_overclock();
|
||||||
|
|
||||||
nfc_init_i2c(I2C_PORT, I2C_SCL, I2C_SDA, I2C_FREQ);
|
nfc_init_i2c(I2C_PORT, I2C_SCL, I2C_SDA, I2C_FREQ);
|
||||||
nfc_init_spi(SPI_PORT, SPI_MISO, SPI_SCK, SPI_MOSI, SPI_RST, SPI_NSS, SPI_BUSY);
|
nfc_init_spi(SPI_PORT, SPI_MISO, SPI_SCK, SPI_MOSI, SPI_RST, SPI_NSS, SPI_BUSY);
|
||||||
nfc_init();
|
nfc_init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user