Firmware to manage X-Nucleo-IPS02A1 (24V) Intelligent Power Switch.

Dependents:   HelloWorld_IPS02A1

Fork of X_NUCLEO_IPS02A1 by ST Expansion SW Team

X_NUCLEO_IPS02A1 24V Intelligent Power Switch (IPS) Nucleo Expansion Board Firmware Package

Introduction

This firmware package includes Components Device Drivers and Board Support Package for STMicroelectronics X-NUCLEO-IPS02A1 IPS Expansion Board.

Firmware Library

Class X_NUCLEO_IPS02A1 is intended to represent the Intelligent Power Switch expansion board with the same name.

The expansion board is basically featuring by one IP:

  • vps2535h vertical power switch.

It is intentionally implemented as a singleton because only one X-NUCLEO-IPS02A1 at a time might be deployed in a HW component stack. In order to get the singleton instance you have to call class method `Instance()`, e.g.:

// IPS expansion board singleton instance
static X_NUCLEO_IPS02A1 *ips_expansion_board = X_NUCLEO_IPS02A1::Instance();

How to use the firmware package

The basic operations to deal with the firmware pkg and use the IPS are the following :

1) instantiate the X_NUCLEO by calling class method `Instance()`:

// Sensors expansion board singleton instance
static X_NUCLEO_IPS02A1 *sensors_expansion_board = X_NUCLEO_IPS02A1::Instance();

2) Switch-on or Switch-off loads output (Channel 1 or Channel 2) by setting or clearing associated digital input :

            ips_expansion_board.vps2535h.Fr_Stby = 1; // set Fr_Stby pin
            ips_expansion_board.vps2535h.In_1 = 1; // switch-on Channel 1
            ips_expansion_board.vps2535h.In_2 = 0; // switch-off Channle 2 

3) Read Current circulating on Channel 1 or Channel 2 and print on the Terminal

            Multisense_Signal= ips_expansion_board.GetCurrent(CHANNEL_1);
            printf("Current Ch1 = %2.3fA \n\r", Multisense_Signal);
            Multisense_Signal= ips_expansion_board.GetCurrent(CHANNEL_2);
            printf("Current Ch2 = %2.3fA \n\r", Multisense_Signal);

Files at this revision

API Documentation at this revision

Comitter:
grussian
Date:
Thu Jul 28 16:42:52 2016 +0000
Parent:
5:b683e69b181c
Child:
7:10e489682b80
Commit message:
update st copyright to 2016

Changed in this revision

Components/Common/IPS.h Show annotated file Show diff for this revision Revisions of this file
Components/Interfaces/Component_class.h Show annotated file Show diff for this revision Revisions of this file
Components/Interfaces/PowerSwitch.h Show annotated file Show diff for this revision Revisions of this file
Components/vps2535h/vps2535h.h Show annotated file Show diff for this revision Revisions of this file
Components/vps2535h/vps2535h_class.cpp Show annotated file Show diff for this revision Revisions of this file
Components/vps2535h/vps2535h_class.h Show annotated file Show diff for this revision Revisions of this file
x_nucleo_ips02a1.cpp Show annotated file Show diff for this revision Revisions of this file
x_nucleo_ips02a1.h Show annotated file Show diff for this revision Revisions of this file
--- a/Components/Common/IPS.h	Thu Jul 28 16:05:28 2016 +0000
+++ b/Components/Common/IPS.h	Thu Jul 28 16:42:52 2016 +0000
@@ -9,7 +9,7 @@
  *******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
--- a/Components/Interfaces/Component_class.h	Thu Jul 28 16:05:28 2016 +0000
+++ b/Components/Interfaces/Component_class.h	Thu Jul 28 16:42:52 2016 +0000
@@ -9,7 +9,7 @@
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
--- a/Components/Interfaces/PowerSwitch.h	Thu Jul 28 16:05:28 2016 +0000
+++ b/Components/Interfaces/PowerSwitch.h	Thu Jul 28 16:42:52 2016 +0000
@@ -9,7 +9,7 @@
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
--- a/Components/vps2535h/vps2535h.h	Thu Jul 28 16:05:28 2016 +0000
+++ b/Components/vps2535h/vps2535h.h	Thu Jul 28 16:42:52 2016 +0000
@@ -13,7 +13,7 @@
  *******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
--- a/Components/vps2535h/vps2535h_class.cpp	Thu Jul 28 16:05:28 2016 +0000
+++ b/Components/vps2535h/vps2535h_class.cpp	Thu Jul 28 16:42:52 2016 +0000
@@ -8,7 +8,7 @@
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
--- a/Components/vps2535h/vps2535h_class.h	Thu Jul 28 16:05:28 2016 +0000
+++ b/Components/vps2535h/vps2535h_class.h	Thu Jul 28 16:42:52 2016 +0000
@@ -13,7 +13,7 @@
  *******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
--- a/x_nucleo_ips02a1.cpp	Thu Jul 28 16:05:28 2016 +0000
+++ b/x_nucleo_ips02a1.cpp	Thu Jul 28 16:42:52 2016 +0000
@@ -8,7 +8,7 @@
  ******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
--- a/x_nucleo_ips02a1.h	Thu Jul 28 16:05:28 2016 +0000
+++ b/x_nucleo_ips02a1.h	Thu Jul 28 16:42:52 2016 +0000
@@ -9,7 +9,7 @@
  *******************************************************************************
  * @attention
  *
- * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+ * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met: