Before introduction of LL based clock control for stm32f1xx series,
prepare gpio driver to provide useful definition for new API
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Align stm32f1xx series clock driver to other parts of stm32 family.
Driver support both Connectivity and Density lines of stm32f1 series,
that are based on different Reset and Clock Control architectures.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The STM32F413 has PWM output capabilities. Add support to the blink_led
samples.
Tested using a Nucleo STM32F413ZH board (PWM output on pin 28 of the
CN11 Morpho connector and pin 29 of the CN10 Zio connector).
Change-Id: I3b25b09cab54265b28088ac9681aec588d9d48b5
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
The Nucleo STM32F413 board is missing the default pinmux for PWM2 on
PA0, as stated in the doc. The same pinmux is also done for other
similar Nucleo board. So add it!
Change-Id: I2086c0a4ce65d68455a0978570f118e965f4c6ca
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
Enable the MPU on the Nucleo STM32F413 board.
Change-Id: I0f256a4c7231f9d3844e67a94d989c8d93b60e58
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
The STM32F413ZH has 1536kB of Flash and 320kB of SRAM. This
configuration is currently not supported by ST MPU driver, so fill in
the blanks.
Note: The MPU does not support region size that is not a power-of-2 (see
the SIZE field in the MPU_RASR register). This is a problem for our
1536kB Flash region, so it was rounded up to the nearest choice. This is
possible because the memory in the range 0x0818000 - 0x0FFFFFFF is
"Reserved" and thus not mapped anyway.
Change-Id: If0c3d1db564ca45e77f8b5bafa2afdbafa85b40f
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
CONFIG_CLOCK_VDD_VOLTAGE does not exist. It was introduced by accident
with commit 614db02cc6 ("stm32f4: Add STM32F413 Nucleo board"), so
remove it!
Change-Id: I3363a92627708bf5ffb080c2238fc84c71caa8d9
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
Atmel SAM3X series has been recently converted to use ASF
and should now use common SAM family drivers. The atmel_sam3
serial driver will be removed in the future.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Instead of waiting forever for a free net_buf, set a timeout to
the allocations (500 ms). This way the application will not be
blocked by memory exhaustion.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In some cases the net_pkt can be null when freeing it,
this will print error from net_pkt library. Avoid this by
checking the value of net_pkt before calling net_pkt_unref().
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we re-connect to same peer server, then we should select a new
source port. Noticed that if the same source port as before is
used for the new connection, the peer might drop the packet. This
was seen when connecting to Linux peer.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The number of RX and TX buffers is increased to 64 as the
earlier limit can cause memory exhaust in some cases.
Jira: ZEP-2223
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Defines a new tunable, CONFIG_NET_TCP_RETRY_COUNT, that determines the
number of segment retransmissions that the IP stack will attempt to
perform before resetting the connection.
The default value is 9 retransmissions, which amounts to 1:42 minutes,
as close as possible to the minimum recommended by RFC1122.
Jira: ZEP-1956, ZEP-1957
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This fix is basically a no-op as the rx_buf pointer cannot be null
in practice, but in order to avoid Coverity complaining about
it add some null pointer checks to the UDP handling code.
Coverity-CID: 170124
Jira: ZEP-2235
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Calling 'svc' on ARMv6 causes a hard fault if interrups are locked.
Force them unlocked before making the svc call.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fix nRF RTC timer from returning more than actual cycles
in _timer_cycle_get_32, under race condition when ISR
announces to kernel.
Jira: ZEP-2229
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Instead of NULL terminated buffer arrays, let's add a parameter for each
that tells the number of spi_buf in it.
It adds a little bit more complexity in driver's side (spi_context.h)
but not on user side (bufer one has to take care of providing the NULL
pointer at the end of the array, now he requires to give the count).
This will saves a significant amount of bytes in more complex setup than
the current dumb spi driver sample.
Fix and Use size_t everywhere (spi_context.h was using u32_t).
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Increase to 1024 to get more tests and sample running on this device
with only 8K of SRAM.
Change thread stack size in the mslab test to make it fit into this
board.
Jira: ZEP-2079
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This reverts commit 37f4178f58.
This change builds gen_idt in the zephyr project tree instead of
building it in outdir of the application. The build process should all
happen inside outdir and no binaries should be placed in the zephyr
tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It's mandatory to set chan->ops so explicit checks for it are
redundant. What's worse, inconsistent checking for this triggers
static code analyzer warnings. This patch fixes Coverity CID 151984.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
pop {lr} instruction is not supported in ARMv6-M, fixed by
using pop {r0}; mov lr, r0; instructions.
Jira: ZEP-2222
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
buf->len should be validated before accessing it since remote can
send invalid frame_len which can result in out of bound memory
access.
This also fix the len check wrt cstate, since current check is
not considering the cstate length size and frame_len size.
Jira: ZEP-2110
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Added shell module for the Bluetooth Controller's ticker
interfaces.
For now, info command enumerates active tickers' details.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
If we receive unknown option in neighbor advertisement message,
then skip those properly. Old code did not check the length of
the extension options which could cause infinite loop.
Jira: ZEP-2219
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
Waiting for an NET_EVENT_IF_UP before trying to connect isn't sufficient
in some cases; for instance, on devices using the MCUX HAL, such as the
FRDM-K64F, the interface will have the NET_IF_UP flag set even though
the link negotiation didn't yet complete.
Executing this sample on such board will produce the following output.
Notice the "Enabled 100M..." message right after trying to connect.
[dev/eth_mcux] [DBG] eth_0_init: MAC 00:04:9f:6f:91:da
net_context_connect error Is the server (broker) up and running?
[publisher:247] network_setup: -60 <ERROR>
Bye! [dev/eth_mcux] [INF] eth_mcux_phy_event: Enabled 100M
full-duplex mode.
Even though the returned error is ETIMEDOUT, increasing
net_context_connect()'s timeout parameter to several seconds isn't
sufficient; other steps performed by network_setup() after the link has
been fully established are necessary. As a stopgap measure, try
connecting a few times before giving up (more than one connection
attempt should be made by application in most cases, anyway.)
It might be the case that we need events to monitor ethernet link
(re)negotation in addition to the NET_IF_UP bit.
Jira: ZEP-2036
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
On MSYS2, the #include paths for GCC need to be in native format
(Windows-style paths) since GCC is a native Windows application and
therefore requires standard paths.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This patch adds a dts config include file that is sourced during builds.
The config file contents are key value pairs derived from the DTS board
descriptions.
Jira: ZEP-2119
Change-Id: I4d50e795ba776645b56f0b83410cbb5b0a8fd4fa
Signed-off-by: Andy Gross <andy.gross@linaro.org>
This will generate an additional file that can be sourced by the build
system to expose definitions generated by device tree and used for
flashing and debugging targets.
Change-Id: I184e247f0a8dbd1a4a42dd4b02ea01f2caa70533
Jira: ZEP-2119
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use argeparse for options and add a fixup option to add on top of
generated file. This was previously done in the top Makefile and was
generated defines outside of the header main if statement.
Jira: ZEP-2147
Change-Id: If65f34a11de27baa770d4ce0ef4fca2abbd30258
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some users started the wrong shell (MinGW) and ended up having build
issues, added a note about starting the right shell.
Jira: ZEP-2004
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fixed documentation and updated config files for xtools to be used with
the latest version of crosstool-ng (1.23)
Jira: ZEP-616, ZEP-2146
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If we received a bad HTTP request, then subsequent good requests
were also returning 400 error code. The parsing state needs to
be initialized after each received HTTP request.
Jira: ZEP-2181
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add tests for new macro helpers that allow JSON field names to differ
from their corresponding C struct field names. These pass.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
The set of valid JSON field names is larger than the set of C
identifiers. This can result in structure field names which pack
decoded JSON values which necessarily differ from the field names in
the JSON.
Support this by adding _NAMED variants to each of the JSON_OBJ_DESCR_*
helper macros. For example, JSON_OBJ_DESCR_PRIM_NAMED allows users to
declare a descriptor field for a primitive type, whose structure field
name is different from the JSON field name.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Fixes the following issue:
"In expression 1UL << chan - 1U, left shifting by more than 31
bits has undefined behavior. The shift amount, chan - 1U, is
4294967295."
Coverity-CID: 167140
Jira: ZEP-2131
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The error was generated by a piece of code that is
not currently being used. This piece of code was kept to measure
the overhead caused by the benchmarking code on x86.
JIRA:ZEP-2160
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>