spim_nrf52: Prevent glitch on CS line in spim_nrf52_init()

The output state of the CS GPIO must be configured with a pull-up while
setting the GPIO as output. Otherwise the GPIO will be forced low,
before being set high by the call to spim_nrf52_csn(). This results in a
glitch of 1us on the CS line, which may confuse some ICs in the worst
case.

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
This commit is contained in:
Florian Vaussard 2017-07-20 10:32:42 +02:00 committed by Kumar Gala
commit 71b25a12c3

View file

@ -329,7 +329,7 @@ static int spim_nrf52_init(struct device *dev)
if (config->psel.ss[i] != SS_UNUSED) {
status = gpio_pin_configure(data->gpio_port,
config->psel.ss[i],
GPIO_DIR_OUT);
GPIO_DIR_OUT | GPIO_PUD_PULL_UP);
__ASSERT_NO_MSG(status == 0);
spim_nrf52_csn(data->gpio_port, config->psel.ss[i],