I welcome you to my review of MAX31343 Shield. My review is split to multiple chapters linked in following table of contents. Main page of review (marked with yellow star) contains summary, final score, and description of all chapters. Most important chapters of review begin with “Review” in name and contains detailed description of thing under review. This chapter is one of them. Except this chapter reviewing RTC chip there are also chapters reviewing, evaluation shield, bundled PICO board and MCU present on PICO board. There are also described projects which I have done for evaluating this shield and finally there one tutorial showing how to easily use roadtested shield with Arduino.

 

Review Table of Contents

 

 

Review of RTC Chip

MAX31343 is Real Time Clock used for keeping real time (real time is time which is used by humans. It is time like 12:34 AM). RTC chips are designed to also keep time while system is power off (or even when system is power on). Similarly, to any other RTC chip MAX31343 supports powering from two sources and automatically switch power when one of them is lost. Power sources are main power supply (Vcc) and backup battery (Vbat). RTC chips differ in features, accuracy, number of external components needed and some other aspects. In this review I will look in detail what MAX31343 offers and how you can use it. In review I will mostly point to features of chip and I will spend less time with accuracy analysis. Later in this chapter I describe software and documentation related to this chip which are provided by Maxim.

 

Features

MAX31343 support many features which I group to following groups:

 

  • Date and time keeping
  • Alarms
  • Timer
  • Interrupt control
  • Clock generation
  • Configurable power management
  • Trickle charger
  • Temperature sensor
  • RAM

 

I2C Interface

All features of chip are accessible and configurable over I2C. Sensor follow standard protocol and uses address 0x68 which is common to most RTC chips. It makes completely sense. There is usually no need to have multiple RTC chips in one design. Address is not configurable, but I do not consider this as significant issue for the same reason. Lastly there are no free unused pin on chip, so Maxim had no opportunity to make address configurable. Interface supports both commonly used speeds 100kHz and 400kHz. It does not support ultra-fast modes. Interface support very useful timeout feature preventing stuck I2C bus in “deadlock” in case of master crash while transaction is in progress. This feature is enabled by default, but you can disable it.

 

Accuracy

I did not do any significant accuracy measurements, but over two months of roadtesting I have not mentioned any significant drift more than 1 second from my computer time synchronized using NTP. It is complicated to say exactly because I sometime reconfigured time due to experiments, but after whole roadtesting period I think chip is accurate enough. Accuracy is also measurable from the compensated SQW output. While it should be exactly 1 Hz, I have multiple time seen it as 0.999 Hz in my cheap logic analyser with 24 MHz sampling frequency.

 

Unique and Interesting Features

One of feature which should be considered as a unique is integrated MEMS oscillator reducing need for providing external one. In fact, it is not totally unique because there are available chips from other vendors with this kind of oscillator, but it is at least very interesting feature. Most currently available RTC chips need to provide external crystal. MAX31343 do not need it, so you do not need to worry about selection of crystal and possibly its tuning using capacitors. The only external components needed are (two) decoupling capacitors and (between 2 to 4) external pull ups for I2C wires, interrupt wire (if used) and clock output (if used).

 

Pretty unique feature is trickle charger. We can also find trickle charger in competitor’s RTC chips, but most common RTC hip has no trickle charger. Trickle charger is used for charging backup battery or supercapacitor. Legacy way of backup powering was using batteries which were mostly non-rechargeable. Due to emerging super-capacitors in last years, there are available capacitors with very high capacitance able to power circuit with very low consumption like RTC chips are. Trickle charger can be used for powering supercapacitor from main power supply when available. When using MAX31343 you can configure current limiting resistor and optional voltage drop diode. Except trickle charger, MAX31343 allow configuring power supply modes. Normally you will most probably use (default) automatic mode which handles switching between power supplies automatically, but you can choose manual mode. Using manual mode, you can modify behaviour of power supply selection. While it is not hard to understand this, in datasheet it is described in a quite complicated way.

 

While it is not very important, MAX31343 is new generation chip and supports “newer” years range 2000 – 2199.  Most RTC chips still supports years 1900 – 2099. You of course can use it in whatever century you want but leap year correction will work between 2000 – 2199. I tested it and leap year correction works correctly in whole of this range (testing program is in attachment of this post). Only notice I have about it is that datasheet does not explicitly mention this range. Even century bit (which is used to identify range 2000-2099 from 2100-2199) has not explicitly mentioned this. Similarly, to this issue datasheet does not describe value range of day of week field. This field is independent on any other field and it increments at midnight. There are no restrictions about first day of week. You can configure first day of week to Sunday or Monday depending on your location, but you also can set first day of week to Wednesday if you want. Field increment every day at midnight. Datasheet does not explicitly mention if the value range of this field is 0 – 6, or 1 – 7. Correct answer is 1 – 7.

 

MAX31343 support two alarms. Alarm triggers interrupt at configured time. Alarm1 is more advanced than Alarm2. Alarm1 supports triggering interrupt at following intervals:

 

  • Every second
  • Every minute at configured second (for example you can configure it to trigger every minute at 42 seconds. It will trigger at 12:34:42, then at 12:35:42, then at 12:36:42, and so on)
  • Every hour at configured second and minute
  • Every day at configured hour, minute and second
  • Every week at configured day of week, hour, minute and second
  • Every month at configured day of month, hours, minute and second
  • Every year at specified month, date, hour, minute and second
  • Exact match

 

Alarm2 supports reduced modes. It does not support specifying second when interrupt occur. It can always trigger only when second value is 0. Note that this is also not mentioned in datasheet. It supports following modes:

 

  • Every minute at 00 seconds
  • Every hour at configured minute and 00 seconds (for example you can configure it to trigger every hour at 33 minutes. It will trigger at 12:33:00, then at 13:33:00, then at 14:33:00, and so on).
  • Every day at configured hours, minute, and 00 seconds
  • Every week at configured day of week, hours, minute, and 00 seconds
  • Every month at configured date, hours, minute, and 00 seconds

 

Both alarms are very similar to alarms offered by other RTC chips. I am little bit sad, that features of Alarm2 are reduced. I am not sure if this design is for reducing power consumption, but I likely to see same alarms so firmware can use them in uniform way. I also likely to see more alarms. Especially from high-end RTC like MAX31343 is. If you want to use more than two alarms or you need to use Alarm2 in a more advanced way than it supports, you must implement in firmware. It is not hard but I still likely to see more generic alarms.

 

Next feature which is not present in all RTC chip is timer. It is simple countdown timer. You can configure repeat mode and auto reload value. It can generate interrupt. It is useful when you need some low frequency timer. Timers in MCUs are usually clocked by some high internal clock. This timer can be clocked by 16 Hz, 64 Hz, 256 Hz or 1024 Hz clocks. You can use it for real-time countdowns when you do not want to utilize timer of your MCU, you do not need precise synchronization and high resolution. Also you can use it when you exhaust all timers offered by your MCU.

 

Lastly there are temperature sensor which is used for compensations and makes RTC chip stable and accurate at least over whole working temperature range. Sensor is configurable and measured temperature is also available to you. You can configure manual and automatic mode. In manual mode you must trigger conversions manually, wait for interrupt (or poll status) and then you can read it. In automatic mode chip measures temperature regularly in configurable interval (between 1 to 128 seconds).

 

Finally, there are 64 bytes RAM which you can use for storing small amount of data persistently and independently on main voltage. Memory is directly mapped to registry space. Reading and writing it is very easy in comparison with chips that requires writing to pointer register first.

 

Missing features

Chip does not support any week counter. You can easily implement this feature in firmware and use RAM of chip for storing this. AM/PM mode is also not supported. I live in country when we use 24 hours format instead of AM/PM, but if you need it, you need to implement it in firmware. Similarly, it is also easy. I do not remember any significant feature which I have seen in other RTC chip but not present in MAX31343. MAX31343 is complete chip and can do exactly what is expected from RTC chip. I was able to implement whatever I need including implement all features of RTC driver in Linux kernel, so I think It does not miss anything.

 

Packages

One of my notice is that similarly to any other chip form Maxim, they do not offer this chip in package which is easy to solder. MAX31343 is available in WLP and TDFN package. Both with 8 pins and both are hard to solder by hand. There are no TSSOP, SOT or even DIP packages. But because this chip is only 8 pin you, depending on your skills you may consider TDFN variant solderable. Size of chip and fact that external crystal oscillator is not needed brings up very important benefit – reduction of occupied PCB space. If you need RTC and you need to save PCB space as much as possible MAX31343 is very good choice.

 

Maxim offers CAD symbols, footprints and 3D model for chip using Ultra Librarian for most common CAD systems including Altium Designer, Cadence OrCAD, Eagle, Kicad and many others. Symbol, footprint and model looks good.

 

Documentation

MAX31343 chip documentation is quite complete but lacks some details which I have mentioned in previous sections like missing described ranges of allowed values in fields. The only notice on chip documentation which I also mention in other chapters in documentation section is that documentation is very inconsistent. When researching RTCs offered by Maxim I downloaded many datasheets and almost anytime I have seen differently structured datasheet then previous one. For example, MAX31343 contains typical application circuit at the end of document while older DS3231 has it on main page. Other examples are register maps and descriptions. While MAX31343 have tables in compact style with consistently written values in hexadecimal notation and all registers are correctly linked in navigation panel in PDF viewer, MAX31328 datasheet has large tables, values are mixed in binary and hexadecimal formats and no registers are linked to navigation panel in PDF viewer. Yet another example of total inconsistency is MAX31341B/C datasheet which have no working navigation at all. It looks like Maxim do all datasheet manually, multiple peoples do them independently and except basic template they have no shared rules how to write technical documentation. Documents also differ in content structure. It is very hard comparing their chips and documentation do not help much with this.

Most of things what I have said about PDF datasheets also apply for website. Some Maxim chips have simple block diagram drawn using black lines on white background, some of them have modern diagram paint in corporate colours. I originally thought that modern design is newer but for some reason they mix designs even at pages of chips referred on New products page. At the time of writing this text, block diagram shown on page of MAX31343 chip is broken:

 

The good thing about MAX31343 page is that it is complete. I found all documentation and software related to this chip here. Only missing information there is explanation of star note in price column.

 

I also missing some comparison with other chips. It is very hard to determine what are differences between at least chips with similar names like MAX31341, MAX31342 and MAX31343. Vendors usually provides some tables highlighting main differences between their models in one family. In fact, I did not find any common properties of them except all of them are RTC chip. After looking to their datasheets, I felt like they were designed totally independently and possibly by different teams. I found some similarities between MAX31341 and MAX31342 which look like partially registry compatible but for example alarm registers addresses do not match. Register map of 31343 is completely different. Migration possibilities are very low and mostly you will need to rewrite your software.

 

Software

Except evaluation kit GUI software which is briefly described in chapter Review of Evaluation Shield there is Arduino Library. I have shown this library in Tutorial 1. It is very interesting that Maxim provide Arduino library. It makes sense because they allow evaluate their chip using Arduino shield but in opposition MAX31341B/C and MAX31342 are also evaluable using shield and Maxim do not provide any library for these chips. When browsing over their website I did not find any other Arduino library. I think MAX31343 is only chip with library available. If Maxim read it, I recommend providing library for these chips. At least chips which they allow to evaluate on Arduino shields. Now I will review library itself.

 

Arduino Library

Library is very high quality. In comparison with other libraries it properly handles and propagates errors. Code is properly formatted, easy to read and adequately commented. Library is easy to use and works out of box. There are two examples showing how to use and configure alarm and timer. I can imagine more examples, but they are not totally necessary because most other features are configurable using few simple calls and fundamentals can be found in provided examples.

 

I have only one notice about one function of library. There is method named get_interrupt_source. This method allows you retrieve information what part of chip caused interrupt. Interrupt can be caused due to multiple reason. Except alarm interrupt, interrupt can be triggered by notification that temperature measurement is available, interrupt form timer and some other interrupts. There are three issues with this method. First is that it ignores possible situation when two interrupts source caused interrupt in the same (or very similar) time. Function is designed that it returns bit offset of first flag set. If interrupt is triggered by multiple source you get information only about one source. Other flags are discarded by the nature of status register implementation. Second issue with method is that it returns 0 when no flag is set. But 0 is also index of interrupt flag for alarm1. So, when you receive 0 from function, you cannot be sure if it is because you are facing spurious interrupt (or valid interrupt from another sensor. Interrupt line is driven in open drain manned so you can connect multiple sensors/chips to it) or you received valid interrupt from alarm1. Last issue is that this is only function which improperly handles error return codes which I have seen there. If reading registry for some reason fails (I2C bus error, arbitration lost, unexpected NACK, …), function properly checks for error, print error message but do not return and instead of it, it continues execution like no error has occurred. Then it processes possibly uninitialized variable and return random flag to you.

 

While I wrote my own library, I like provided library and I recommend using it if you are using Arduino because it is the easiest way to use MAX31343 RTC chip. While I found some issues with one function, library quality is high in overall. Quality is much better than some other commonly used Arduino libraries, including system libraries. In most cases, you can rely on this library.

 

Price and Availability

Price of chip is 3.75 USD at Newark at the time of writing this review and when buying 1 piece. When buying 250 pieces price decrease to 2.39 USD. It is quite high in comparison with other RTC chips but when I take in account that chip has integrated accurate oscillator, temperature sensor for compensations and consume very low current, I think price is acceptable. For example, MAX31341 which has no integrated oscillator and offers less features cost 2.50 USD @ 1pcs and 1.70 USD @ 250 pcs. MAX31342 which also has no integrated oscillator and support also very few features in comparison with MAX31343 costs only 1.12 USD @ 1pcs and there are no batch discounts at Newark.

 

The very good thing is availability. While there are components supply outage crisis at the time of writing this review, MAX31343 chips are available in stocks of most electronics distributors. Many other Maxim chips which I have searched are also available, so it looks that Maxim supply chain is very good assured.

 

Summary

MAX31343 is good RTC chip with very good accuracy and supports compressive feature set. Due to integrated MEMS oscillator it does not require external crystal. Vendor also provides high quality library for using them. Chip is available in small footprint and is good when you need save as much PCB space as possible. Disadvantage is that it is quite expensive.