element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sustain The World - Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Sustain The World - Design Challenge
  • More
  • Cancel
Sustain The World - Design Challenge
Blog Sustain The World - Smart Portable Freezer #8 Progress and Failure
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fyaocn
  • Date Created: 9 Oct 2020 3:20 AM Date Created
  • Views 445 views
  • Likes 3 likes
  • Comments 0 comments
Related
Recommended

Sustain The World - Smart Portable Freezer #8 Progress and Failure

fyaocn
fyaocn
9 Oct 2020

        • 1. Slow Progress
        • 2. The Failure
        • 3. Thing to learn and way to go

1. Slow Progress

It has been several weeks with little progress. Study the datasheet of XMC4400 and XMC4200 , even XMC4700.

To find out that hidden features of  XMC series. XMC4 series MCU are especially good for motor control and industrial application. The advanced CCU4 and CCU8 blocks can not be found in other MCUs. While PWM function is still available for simple tasks, as of LRPWM.

The embedded CCU4/CCU8 block are complex with any full functions.

Another POSIF block can get feedback signal from Hall-sensors for better control of motors.

All the function block are hidden behind normal arduino codes and can not be accessible.

The slow progess bring no less fun than progress. That inspire me on new exploration in further projects to utilize the XMC MCU for High Voltage Direct Current invertors/chargers.

image

 

2. The Failure

Even I have configurated the ports and pins correctly, the SPI and Wire are still not work well.

image

With Error report

libraries\SPI\HW_SPI.cpp.o: In function `SPISettings::SPISettings()':


C:\Users\north\AppData\Local\Arduino15\packages\Infineon\hardware\arm\1.5.0\libraries\SPI\src/SPI.h:96: undefined reference to `XMC_SPI_0'


libraries\Wire\Wire.cpp.o: In function `__static_initialization_and_destruction_0':


C:\Users\north\AppData\Local\Arduino15\packages\Infineon\hardware\arm\1.5.0\libraries\Wire\src/Wire.cpp:817: undefined reference to `XMC_I2C_0'

There are wrong definition with Wire.h and SPI.h libary. From source code, Infineon has skipped all the defination of XMC4200 even in basic SPI and Wire libararies. Such as,

in wire.h,

extern TwoWire Wire;
#if (NUM_I2C > 1)
extern TwoWire Wire1;
# if (NUM_I2C > 2)
extern TwoWire Wire2;
# if (NUM_I2C > 3)
extern TwoWire Wire3;
# if (NUM_I2C > 4)
extern TwoWire Wire4;
# endif
# endif
# endif
#endif

as in wire.cpp,

#if defined(XMC4400_Platform2GO)
    void USIC1_1_IRQHandler()
    {
        Wire.ReceiveHandler();
    }


    void USIC1_2_IRQHandler()
    {
        Wire.ProtocolHandler();
    }
#endif


#elif defined(XMC4700_Relax_Kit)
    void USIC1_1_IRQHandler()
    {
        Wire.ReceiveHandler();
    }


    void USIC1_2_IRQHandler()
    {
        Wire.ProtocolHandler();
    }

    void USIC1_3_IRQHandler()
    {
        Wire1.ReceiveHandler();
    }


    void USIC1_4_IRQHandler()
    {
        Wire1.ProtocolHandler();
    }
#endif

But I still can not solve them for now.

 

3. Thing to learn and way to go

The arduino IDE shall be good for most MCU and boards but for special boards like XMC4200 or Microchip DA series, the vendor version IDE would be more appropriate in fully unlash the power of MCUs.

The time may not enough to solve all the problems. In next blog, I would like to show my original idea on how to make the fridge work.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube