From 91cfe6c9be2d691039434ab8072eedd18ea45e02 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 6 Aug 2017 12:02:55 -0600 Subject: [PATCH] Spirit radio: Dropping packet size to 94 seems to fix problem with CRC failures. --- configs/b-l475e-iot01a/README.txt | 12 ++++++++++++ configs/b-l475e-iot01a/spirit-6lowpan/defconfig | 6 +++--- configs/b-l475e-iot01a/spirit-starhub/defconfig | 6 +++--- configs/b-l475e-iot01a/spirit-starpoint/defconfig | 6 +++--- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/configs/b-l475e-iot01a/README.txt b/configs/b-l475e-iot01a/README.txt index 5888825da3..1880831f36 100644 --- a/configs/b-l475e-iot01a/README.txt +++ b/configs/b-l475e-iot01a/README.txt @@ -398,6 +398,9 @@ Configuration sub-directories At this point everything seems functional, but somewhat reliable. Sometimes things seem to initialize in a bad state. + 2017-08-06: Reducing the FIFO to 94 bytes fixed the problem with the + 2 byte CRC. + Test Matrix: The following configurations have been tested successfully (with CRC disabled): @@ -526,3 +529,12 @@ Configuration sub-directories is handled perfectly and, since it is TCP, there is no loss of data and all tests pass. That is as good as I can do for now. + Another Errata: "Using the STack packet format and no CRC field, the + reading from RX FIFO to the last received byte, is not possible. ..." + Workaround: "By configuring the packet handler with at least one byte + of CRC, the problem is solved. If the CRC is not required in the + application, configure one byte of CRC in the receiver only, to read + the payload correctly from RX FIFO." + + Reducing the FIFO to 94 bytes fixed the problem with the 2 byte CRC + but did not resolve that occasional, harmless RX FIFO error. \ No newline at end of file diff --git a/configs/b-l475e-iot01a/spirit-6lowpan/defconfig b/configs/b-l475e-iot01a/spirit-6lowpan/defconfig index 93879c1720..f155d83a38 100644 --- a/configs/b-l475e-iot01a/spirit-6lowpan/defconfig +++ b/configs/b-l475e-iot01a/spirit-6lowpan/defconfig @@ -36,14 +36,14 @@ CONFIG_FS_PROCFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INTELHEX_BINARY=y -CONFIG_IOB_BUFSIZE=96 +CONFIG_IOB_BUFSIZE=94 CONFIG_IOB_NBUFFERS=32 CONFIG_IOB_NCHAINS=16 CONFIG_LIBM=y CONFIG_MAX_TASKS=16 CONFIG_MAX_WDOGPARMS=2 CONFIG_MM_REGIONS=2 -CONFIG_NET_6LOWPAN_FRAMELEN=96 +CONFIG_NET_6LOWPAN_FRAMELEN=94 CONFIG_NET_6LOWPAN=y CONFIG_NET_BROADCAST=y CONFIG_NET_HOSTNAME="B-L475E-IOT01A" @@ -87,9 +87,9 @@ CONFIG_SCHED_LPWORKPRIORITY=160 CONFIG_SCHED_WAITPID=y CONFIG_SDCLONE_DISABLE=y CONFIG_SPIRIT_BROADCAST=y -CONFIG_SPIRIT_CRCDISABLE=y CONFIG_SPIRIT_MULTICAST=y CONFIG_SPIRIT_NETDEV=y +CONFIG_SPIRIT_PKTLEN=94 CONFIG_START_DAY=2 CONFIG_START_MONTH=8 CONFIG_STM32L4_SPI3=y diff --git a/configs/b-l475e-iot01a/spirit-starhub/defconfig b/configs/b-l475e-iot01a/spirit-starhub/defconfig index 6d032df55e..b66304c43b 100644 --- a/configs/b-l475e-iot01a/spirit-starhub/defconfig +++ b/configs/b-l475e-iot01a/spirit-starhub/defconfig @@ -19,14 +19,14 @@ CONFIG_FS_PROCFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INTELHEX_BINARY=y -CONFIG_IOB_BUFSIZE=96 +CONFIG_IOB_BUFSIZE=94 CONFIG_IOB_NBUFFERS=32 CONFIG_IOB_NCHAINS=16 CONFIG_LIBM=y CONFIG_MAX_TASKS=16 CONFIG_MAX_WDOGPARMS=2 CONFIG_MM_REGIONS=2 -CONFIG_NET_6LOWPAN_FRAMELEN=96 +CONFIG_NET_6LOWPAN_FRAMELEN=94 CONFIG_NET_6LOWPAN=y CONFIG_NET_BROADCAST=y CONFIG_NET_HOSTNAME="B-L475E-IOT01A" @@ -72,9 +72,9 @@ CONFIG_SCHED_LPWORKPRIORITY=160 CONFIG_SCHED_WAITPID=y CONFIG_SDCLONE_DISABLE=y CONFIG_SPIRIT_BROADCAST=y -CONFIG_SPIRIT_CRCDISABLE=y CONFIG_SPIRIT_MULTICAST=y CONFIG_SPIRIT_NETDEV=y +CONFIG_SPIRIT_PKTLEN=94 CONFIG_START_DAY=2 CONFIG_START_MONTH=8 CONFIG_STM32L4_SPI3=y diff --git a/configs/b-l475e-iot01a/spirit-starpoint/defconfig b/configs/b-l475e-iot01a/spirit-starpoint/defconfig index 4701bf238c..db01b39480 100644 --- a/configs/b-l475e-iot01a/spirit-starpoint/defconfig +++ b/configs/b-l475e-iot01a/spirit-starpoint/defconfig @@ -36,14 +36,14 @@ CONFIG_FS_PROCFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INTELHEX_BINARY=y -CONFIG_IOB_BUFSIZE=96 +CONFIG_IOB_BUFSIZE=94 CONFIG_IOB_NBUFFERS=32 CONFIG_IOB_NCHAINS=16 CONFIG_LIBM=y CONFIG_MAX_TASKS=16 CONFIG_MAX_WDOGPARMS=2 CONFIG_MM_REGIONS=2 -CONFIG_NET_6LOWPAN_FRAMELEN=96 +CONFIG_NET_6LOWPAN_FRAMELEN=94 CONFIG_NET_6LOWPAN=y CONFIG_NET_BROADCAST=y CONFIG_NET_HOSTNAME="B-L475E-IOT01A" @@ -88,9 +88,9 @@ CONFIG_SCHED_LPWORKPRIORITY=160 CONFIG_SCHED_WAITPID=y CONFIG_SDCLONE_DISABLE=y CONFIG_SPIRIT_BROADCAST=y -CONFIG_SPIRIT_CRCDISABLE=y CONFIG_SPIRIT_MULTICAST=y CONFIG_SPIRIT_NETDEV=y +CONFIG_SPIRIT_PKTLEN=94 CONFIG_START_DAY=2 CONFIG_START_MONTH=8 CONFIG_STM32L4_SPI3=y