Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
19605: drivers/at86rf2xx: setting rx timestamp based on symbol counter for ATmega*RFR2 r=maribu a=chudov



19624: pkg/tensorflow-lite: remove deprecated package r=maribu a=aabadie

Use tflite-micro instead



19625: sys/hashes: remove deprecated aes cmac hashing r=maribu a=aabadie



Co-authored-by: chudov <[email protected]>
Co-authored-by: Alexandre Abadie <[email protected]>
  • Loading branch information
3 people authored May 19, 2023
4 parents 57555ca + c52f6e7 + eefa4de + 0eb5bac commit a46b49a
Show file tree
Hide file tree
Showing 21 changed files with 106 additions and 297 deletions.
2 changes: 2 additions & 0 deletions cpu/atmega_common/include/cpu_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
extern "C" {
#endif

#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
#define THREAD_EXTRA_STACKSIZE_PRINTF (128)
#endif

/**
* @name Kernel configuration
Expand Down
17 changes: 16 additions & 1 deletion drivers/at86rf2xx/at86rf2xx_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,23 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)
at86rf2xx_fb_stop(dev);
#endif
radio_info->rssi = RSSI_BASE_VAL + ed;
DEBUG("[at86rf2xx] LQI:%d high is good, RSSI:%d high is either good or"
DEBUG("[at86rf2xx] LQI:%d high is good, RSSI:%d high is either good or "
"too much interference.\n", radio_info->lqi, radio_info->rssi);
#if AT86RF2XX_IS_PERIPH && IS_USED(MODULE_NETDEV_IEEE802154_RX_TIMESTAMP)
/* AT86RF2XX_IS_PERIPH means the MCU is ATmegaRFR2 that has symbol counter */
{
uint32_t rx_sc;
rx_sc = at86rf2xx_get_sc(dev);

/* convert counter value to ns */
uint64_t res = SC_TO_NS * (uint64_t)rx_sc;
netdev_ieee802154_rx_info_set_timestamp(radio_info, res);
DEBUG("[at86rf2xx] CS: %" PRIu32 " timestamp: %" PRIu32 ".%09" PRIu32 " ",
rx_sc, (uint32_t)(radio_info->timestamp / NS_PER_SEC),
(uint32_t)(radio_info->timestamp % NS_PER_SEC));
}
#endif

}
else {
at86rf2xx_fb_stop(dev);
Expand Down
42 changes: 42 additions & 0 deletions drivers/at86rf2xx/include/at86rf2xx_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

#if AT86RF2XX_IS_PERIPH
#include <string.h>
#include "irq.h"
#include "time_units.h"
#endif
#include "at86rf2xx_registers.h"

Expand Down Expand Up @@ -293,6 +295,46 @@ static inline uint8_t at86rf2xx_get_irq_flags(at86rf2xx_t *dev)

}

#if AT86RF2XX_IS_PERIPH
/*
* Read a 32 bit register as described in section 10.3 of the datasheet: A read
* of the least significant byte causes the current value to be atomically
* captured in a temporary 32 bit registers. The remaining reads will access this
* register instead. Only a single 32 bit temporary register is used to provide
* means to atomically access them. Thus, interrupts must be disabled during the
* read sequence in order to prevent other threads (or ISRs) from updating the
* temporary 32 bit register before the reading sequence has completed.
*/
static inline uint32_t reg32_read(volatile uint8_t *reg_ll)
{
le_uint32_t reg;
unsigned state = irq_disable();
reg.u8[0] = reg_ll[0];
reg.u8[1] = reg_ll[1];
reg.u8[2] = reg_ll[2];
reg.u8[3] = reg_ll[3];
irq_restore(state);
return reg.u32;
}

/**
* @brief Get the timestamp of the packet in symbol counter ticks
*
* @param[in] dev pointer to the device descriptor
*
* @return the symbol counter value
*/
static inline uint32_t at86rf2xx_get_sc(const at86rf2xx_t *dev)
{
(void) dev;
return reg32_read(&SCCNTLL);
}

/* Symbol counter frequency is 62500Hz. One symbol counter tick is 16us = 16000 ns*/
#define SC_TO_NS (16000LU)

#endif

#ifdef __cplusplus
}
#endif
Expand Down
32 changes: 0 additions & 32 deletions pkg/tensorflow-lite/Makefile

This file was deleted.

15 changes: 0 additions & 15 deletions pkg/tensorflow-lite/Makefile.dep

This file was deleted.

6 changes: 0 additions & 6 deletions pkg/tensorflow-lite/Makefile.include

This file was deleted.

12 changes: 0 additions & 12 deletions pkg/tensorflow-lite/Makefile.tensorflow-lite

This file was deleted.

9 changes: 0 additions & 9 deletions pkg/tensorflow-lite/Makefile.tensorflow-lite-c

This file was deleted.

17 changes: 0 additions & 17 deletions pkg/tensorflow-lite/Makefile.tensorflow-lite-core

This file was deleted.

17 changes: 0 additions & 17 deletions pkg/tensorflow-lite/Makefile.tensorflow-lite-hello_world

This file was deleted.

11 changes: 0 additions & 11 deletions pkg/tensorflow-lite/Makefile.tensorflow-lite-kernels

This file was deleted.

11 changes: 0 additions & 11 deletions pkg/tensorflow-lite/Makefile.tensorflow-lite-kernels-internal

This file was deleted.

9 changes: 0 additions & 9 deletions pkg/tensorflow-lite/Makefile.tensorflow-lite-memory

This file was deleted.

14 changes: 0 additions & 14 deletions pkg/tensorflow-lite/Makefile.tensorflow-lite-micro-kernels

This file was deleted.

10 changes: 0 additions & 10 deletions pkg/tensorflow-lite/doc.txt

This file was deleted.

33 changes: 0 additions & 33 deletions pkg/tensorflow-lite/patches/0001-global-round.patch

This file was deleted.

90 changes: 0 additions & 90 deletions sys/include/hashes/cmac.h

This file was deleted.

1 change: 1 addition & 0 deletions sys/include/net/gnrc/netif/hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "net/gnrc/pkt.h"
#include "net/gnrc/pktbuf.h"
#include "net/gnrc/netif.h"
#include "time_units.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Loading

0 comments on commit a46b49a

Please sign in to comment.