Running the tinkerboard:
Linux tinkerboard 4.4.103+ #1 SMP Fri Jun 22 16:14:49 CST 2018 armv7l GNU/Linux
linaro@tinkerboard:~/tinker_io/tinkerboard_io/build$ sudo ./spi_example
Successfully initialized
Transfer successful
pin 19 and 20 connected together!
I suspected it not to work due to the config in your code:
struct spi_pin_config_t _spi_configs[] = {
{.clk = 10, .txd = 12, .rxd = 14, .cs0 = 28, .cs1 = 30, .spi_block_offset = RK3288_SPI0_BLOCK_OFFSET, .initialized = 0,
.pll_sel_offset = RK3288_CRU_CLKSEL25_OFFSET,
.clk_src_offset = RK3288_CRU_CLKGATE2_OFFSET, .clk_gate_flag = 9,
.pclk_src_offset = RK3288_CRU_CLKGATE6_OFFSET, .pclk_gate_flag = 4,
.softrst_offset = RK3288_CRU_SOFTRST_OFFSET, .softrst_flag = 3},
{.clk = 22, .txd = 18, .rxd = 20, .cs0 = 23, .cs1 = 25, .spi_block_offset = RK3288_SPI2_BLOCK_OFFSET, .initialized = 0,
.pll_sel_offset = RK3288_CRU_CLKSEL39_OFFSET,
.clk_src_offset = RK3288_CRU_CLKGATE2_OFFSET, .clk_gate_flag = 11,
.pclk_src_offset = RK3288_CRU_CLKGATE6_OFFSET, .pclk_gate_flag = 6,
.softrst_offset = RK3288_CRU_SOFTRST_OFFSET, .softrst_flag = 5},
};
Why is this working?
Is there an other spi setup config interfering?
Maybe you can help me?
Running the tinkerboard:
Linux tinkerboard 4.4.103+ #1 SMP Fri Jun 22 16:14:49 CST 2018 armv7l GNU/Linux
linaro@tinkerboard:~/tinker_io/tinkerboard_io/build$ sudo ./spi_example
Successfully initialized
Transfer successful
pin 19 and 20 connected together!
I suspected it not to work due to the config in your code:
struct spi_pin_config_t _spi_configs[] = {
{.clk = 10, .txd = 12, .rxd = 14, .cs0 = 28, .cs1 = 30, .spi_block_offset = RK3288_SPI0_BLOCK_OFFSET, .initialized = 0,
.pll_sel_offset = RK3288_CRU_CLKSEL25_OFFSET,
.clk_src_offset = RK3288_CRU_CLKGATE2_OFFSET, .clk_gate_flag = 9,
.pclk_src_offset = RK3288_CRU_CLKGATE6_OFFSET, .pclk_gate_flag = 4,
.softrst_offset = RK3288_CRU_SOFTRST_OFFSET, .softrst_flag = 3},
};
Why is this working?
Is there an other spi setup config interfering?
Maybe you can help me?