Library to handle the X-NUCLEO-PLC01A1 Programmable Logic Controller Expansion Board based on the VNI8200XP (solid state relay) and CLT01-38SQ7 (octal digital termination array) components.

Dependents:   HelloWorld_PLC01A1

Programmable Logic Controller Library

Library to handle the X-NUCLEO-PLC01A1 Programmable Logic Controller Expansion Board based on the VNI8200XP (solid state relay) and CLT01-38SQ7 (octal digital termination array) components.

Information

For further details on VNI8200XP (Octal high side smart power solid state relay with serial/parallel selectable interface on chip) please refer to ST's web site.

For further details on CLT01-38SQ7 (High speed digital input current limiter) please refer to ST's web site.

SPI configuration

Pin D3 and D13 providing the SPI serial clock are short-circuited in the X-NUCLEO-PLC01A1 Expansion Board.

Please be aware that you may not drive the base board LED if it is connected to pin D13 (as it happens on STM32 Nucleo boards) or D3, otherwise you will get a conflict.

Platform compatibility

  • STM32 NUCLEO boards have been tested with the default configuration provided by the HelloWorld_PLC01A1 example.

return DSPI_HAL_ReadData(spi_address[obj->instance]);

X-NUCLEO-PLC01A1 board powering and startup

The following steps must be followed to run the X-NUCLEO-PLC01A1:

  1. Plug the X-NUCLEO-PLC01A1 onto a base board
  2. Connect the base board to a PC via a standard Type A / mini (or micro) B USB cable
  3. Download the firmware on the MCU hosted on the base board
  4. Supply 24 V to the X-NUCLEO-PLC01A1 board through the J8 connector
  5. The HelloWorld_PLC01A1 demonstration firmware is ready to run: connect any of the 8 inputs on the J8 connector to see the corresponding output on the J10 connector capable of driving a load (i.e. short-circuit input “x” with the 24 V and connect the corresponding output “x” to a load).
Committer:
apalmieri
Date:
Mon Jul 12 10:09:44 2021 +0000
Revision:
7:5d4336d0e372
Parent:
5:0845d4141a01
Update to mbed-os 6 (mbed-os-6.12.0)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Davidroid 5:0845d4141a01 1 /**
Davidroid 5:0845d4141a01 2 ******************************************************************************
Davidroid 5:0845d4141a01 3 * @file Component.h
Davidroid 5:0845d4141a01 4 * @author AST
Davidroid 5:0845d4141a01 5 * @version V1.0.0
Davidroid 5:0845d4141a01 6 * @date April 13th, 2015
Davidroid 5:0845d4141a01 7 * @brief This file contains the abstract class describing the interface of a
Davidroid 5:0845d4141a01 8 * generic component.
Davidroid 5:0845d4141a01 9 ******************************************************************************
Davidroid 5:0845d4141a01 10 * @attention
Davidroid 5:0845d4141a01 11 *
Davidroid 5:0845d4141a01 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Davidroid 5:0845d4141a01 13 *
Davidroid 5:0845d4141a01 14 * Redistribution and use in source and binary forms, with or without modification,
Davidroid 5:0845d4141a01 15 * are permitted provided that the following conditions are met:
Davidroid 5:0845d4141a01 16 * 1. Redistributions of source code must retain the above copyright notice,
Davidroid 5:0845d4141a01 17 * this list of conditions and the following disclaimer.
Davidroid 5:0845d4141a01 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Davidroid 5:0845d4141a01 19 * this list of conditions and the following disclaimer in the documentation
Davidroid 5:0845d4141a01 20 * and/or other materials provided with the distribution.
Davidroid 5:0845d4141a01 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Davidroid 5:0845d4141a01 22 * may be used to endorse or promote products derived from this software
Davidroid 5:0845d4141a01 23 * without specific prior written permission.
Davidroid 5:0845d4141a01 24 *
Davidroid 5:0845d4141a01 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Davidroid 5:0845d4141a01 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Davidroid 5:0845d4141a01 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Davidroid 5:0845d4141a01 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Davidroid 5:0845d4141a01 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Davidroid 5:0845d4141a01 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Davidroid 5:0845d4141a01 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Davidroid 5:0845d4141a01 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Davidroid 5:0845d4141a01 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Davidroid 5:0845d4141a01 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Davidroid 5:0845d4141a01 35 *
Davidroid 5:0845d4141a01 36 ******************************************************************************
Davidroid 5:0845d4141a01 37 */
Davidroid 5:0845d4141a01 38
Davidroid 5:0845d4141a01 39
Davidroid 5:0845d4141a01 40 /* Define to prevent recursive inclusion -------------------------------------*/
Davidroid 5:0845d4141a01 41
Davidroid 5:0845d4141a01 42 #ifndef __COMPONENT_CLASS_H
Davidroid 5:0845d4141a01 43 #define __COMPONENT_CLASS_H
Davidroid 5:0845d4141a01 44
Davidroid 5:0845d4141a01 45
Davidroid 5:0845d4141a01 46 /* Includes ------------------------------------------------------------------*/
Davidroid 5:0845d4141a01 47
Davidroid 5:0845d4141a01 48 #include <stdint.h>
Davidroid 5:0845d4141a01 49
Davidroid 5:0845d4141a01 50
Davidroid 5:0845d4141a01 51 /* Classes ------------------------------------------------------------------*/
Davidroid 5:0845d4141a01 52
Davidroid 5:0845d4141a01 53 /**
Davidroid 5:0845d4141a01 54 * An abstract class for Generic components.
Davidroid 5:0845d4141a01 55 */
Davidroid 5:0845d4141a01 56 class Component {
Davidroid 5:0845d4141a01 57 public:
Davidroid 5:0845d4141a01 58
Davidroid 5:0845d4141a01 59 /**
Davidroid 5:0845d4141a01 60 * @brief Initializing the component.
Davidroid 5:0845d4141a01 61 * @param[in] init pointer to device specific initalization structure.
Davidroid 5:0845d4141a01 62 * @retval "0" in case of success, an error code otherwise.
Davidroid 5:0845d4141a01 63 */
Davidroid 5:0845d4141a01 64 virtual int init(void *init) = 0;
Davidroid 5:0845d4141a01 65
Davidroid 5:0845d4141a01 66 /**
Davidroid 5:0845d4141a01 67 * @brief Getting the ID of the component.
Davidroid 5:0845d4141a01 68 * @param[out] id pointer to an allocated variable to store the ID into.
Davidroid 5:0845d4141a01 69 * @retval "0" in case of success, an error code otherwise.
Davidroid 5:0845d4141a01 70 */
Davidroid 5:0845d4141a01 71 virtual int read_id(uint8_t *id) = 0;
Davidroid 5:0845d4141a01 72
Davidroid 5:0845d4141a01 73 /**
Davidroid 5:0845d4141a01 74 * @brief Destructor.
Davidroid 5:0845d4141a01 75 */
Davidroid 5:0845d4141a01 76 virtual ~Component() {};
Davidroid 5:0845d4141a01 77 };
Davidroid 5:0845d4141a01 78
Davidroid 5:0845d4141a01 79 #endif /* __COMPONENT_CLASS_H */
Davidroid 5:0845d4141a01 80
Davidroid 5:0845d4141a01 81 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/