Hello Eduardo Panchana,
All Kinetis devices have the capability to be reprogram its own internal flash (e.g. via a bootloader). So yes, this is possible with the KL27Z256. Unfortunately we do not have an example implementation using a GPRS module.
In particular the KL27Z256 includes a dedicated bootloader firmware stored in a separate ROM memory.
:smileyinfo: Not all Kinetis parts have a ROM Bootloader. For those Kinetis devices without ROM, a bootloader firmware needs to be programmed in the program flash. See the next link regarding KBOOT and the table with the devices including ROM:
Kinetis Bootloader|NXP
The ROM bootloader uses an algorithm explained in the Reference_Manual and is typically used together with PC Host tools provided by NXP as part of KBOOT installation package.
As mentioned by Jeremy you might try to leverage the integrated ROM bootloader by receiving firmware data via GPRS and constructing the required frame packets and commands, but this will not be a trivial task if you are not experienced with Kinetis and you need to fully understand KBOOT algorithm.
What I recommend as an easier approach is to create your own bootloader algorithm, receive data packets from the GPRS module, send them to the KL27 via UART (I guess this is the interface to your GPRS module) and sequentially program the flash with the new firmware. As starting point you can refer to the UART and Flash examples in KSDK. Build and download KSDK for your device from the next page:
Software Development Kit for Kinetis MCUs|NXP
Some things to consider in a Kinetis bootloader:
(1) - Bootloader firmware is usually placed at the start of flash, then the application image needs to be placed at an offset address to give space to the bootloader. Placement and reserved space are handled within the linker file.
(2) - In the application firmware the vector table needs to be relocated to the corresponding offset. This is done by writing to the VTOR register, so it points to the application's vector table.
(3) - It is recommended to reset all peripheral configurations (e.g. UART) before jumping to the application, so it starts from a known state.
For general theory on Kinetis bootloaders you can give a check to some of the Kinetis bootloader application notes:
AN2295 Developer's serial bootloader
AN4367 Ethernet bootloader
AN4370 USB DFU boot loader
AN4368 USB MSD host bootloader
AN4379 USB MSD device bootloader
I hope this information helps. Let me know if you have doubts.
Regards!
Jorge Gonzalez